tpm2-tss

AUTHOR
Version 3.2.0
Fri Oct 7 2022 

Table of Contents

Table of contents

Main Page

This repository hosts source code implementing the Trusted Computing Group's (TCG) TPM2 Software Stack (TSS). This stack consists of the following layers from top to bottom:

Feature API (FAPI) as described in the TCG Feature API (FAPI) Specification along with TCG TSS 2.0 JSON Data Types and Policy Language Specification This API is designed to be very high-level API, intended to make programming with the TPM as simple as possible. The API functions are exposed through a single library: libtss2-fapi.
Enhanced System API (ESAPI) as described in the TCG TSS 2.0 Enhanced System API (ESAPI) Specification This API is a 1-to-1 mapping of the TPM2 commands documented in Part 3 of the TPM2 specification. Additionally there are asynchronous versions of each command. In addition to SAPI, the ESAPI performs tracking of meta data for TPM object and automatic calculation of session based authorization and encryption values. Both the synchronous and asynchronous API are exposed through a single library: libtss2-esys.
System API (SAPI) as described in the TCG TSS 2.0 System Level API (SAPI) Specification This API is a 1-to-1 mapping of the TPM2 commands documented in Part 3 of the TPM2 specification. Additionally there are asynchronous versions of each command. These asynchronous variants may be useful for integration into event-driven programming environments. Both the synchronous and asynchronous API are exposed through a single library: libtss2-sys.
Marshaling/Unmarshaling (MU) as described in the TCG TSS 2.0 Marshaling/Unmarshaling API Specification This API provides a set of marshaling and unmarshaling functions for all data types define by the TPM library specification. The Marshaling/Unmarshaling API is exposed through a library called libtss2-mu.
TPM Command Transmission Interface (TCTI) as described in the TCG TSS 2.0 TPM Command Transmission Interface (TCTI) API Specification. This API provides a standard interface to transmit / receive TPM command / response buffers. It is expected that any number of libraries implementing the TCTI API will be implemented as a way to abstract various platform specific IPC mechanisms. Currently this repository provides several TCTI implementations: libtss2-tcti-device, libtss2-tcti-tbs (for Windows), libtss2-tcti-swtpm and libtss2-tcti-mssim. The former should be used for direct access to the TPM through the Linux kernel driver. The latter implements the protocol exposed by the Microsoft software TPM2 simulator.
The TCG TSS 2.0 Overview and Common Structures Specification forms the basis for all implementations in this project. NOTE: We deviate from this specification by increasing the value of TPM2_NUM_PCR_BANKS from 3 to 16 to ensure compatibility with TPM2 implementations that have enabled a larger than typical number of PCR banks. This larger value for TPM2_NUM_PCR_BANKS is expected to be included in a future revision of the specification.
 
Instructions to build and install tpm2-tss are available in the INSTALL file.
 
If you're looking to discuss the source code in this project or get some questions answered you should join the 01.org TPM2 mailing list: https://lists.01.org/postorius/lists/tpm2.lists.01.org/. We also have an IRC channel set up on FreeNode called #tpm2.0-tss. You can also try Gitter 
You can join a weekly online call at TPM.dev, where we are discussing the tpm2-tss stack, the tpm2-pkcs11 project and other Linux TPM2 & TSS2-Software.
In case you want to contribute to the project, please also have a look at the Contribution Guidelines.
 
The doxygen documentation can either be built by oneself (see the INSTALL file) or browsed directly on tpm2-tss.readthedocs.io.
 
This repository contains a test suite intended to exercise the TCTI, SAPI and ESAPI code. This test suite is not  intended to test a TPM implementation, so this test suite should only be run against a TPM simulator. If this test suite is executed against a TPM other than the software simulator it may cause damage to the TPM (NV storage wear out, etc.). You have been warned.
 
The TPM library specification contains reference code sufficient to construct a software TPM 2.0 simulator. This code was provided by Microsoft and they provide a binary download for Windows here.
There are two implementations that enable building and running this code on Linux. Issues building or running the simulator should be reported to respective project.
 
The Software TPM is an open-source TPM emulator with different front-end interfaces such as socket and character device. Its code is hosted on GitHub and building is faciliated by the GNU Autotools. The TCTI module for using this simulator is called swtpm .
Since tpm2-tss v3.0 swtpm is the default simulator used by this project.
 
IBM has also repackaged this code with a few Makefiles so that the Microsoft code can be built and run on Linux systems. The Linux version of the Microsoft TPM 2.0 simulator can be obtained on SourceForge. Once you've downloaded and successfully built and execute the simulator it will, by default, be accepting connections on the localhost, TCP ports 2321 and 2322. The TCTI module for using this simulator is called mssim .
 
To test the various TCTI, SAPI and ESAPI api calls, unit and integration tests can be run by configuring the build to enable unit testing and running the "check" build target. It is recommended to use a simulator for testing, and the simulator will be automatically launched by the tests. Please review the dependency list in INSTALL for dependencies when building the test suite. 
$ ./configure --enable-unit --enable-integration
$ make -j$(nproc) check
 This will generate a file called "test-suite.log" in the root of the build directory.
Please report failures in a Github 'issue' with a full log of the test run.
NOTE: The unit and integration tests can be enabled independently. The –enable-unit option controls unit tests, and –enable-integration controls the integration tests.
 
To run integration tests on a physical TPM device, including a TPM hardware or a software TPM implemented in platform firmware the configure script provides two options. The first option is called –with-device and it is used to point to the TPM device interface exposed by the OS, for example:

$ ./configure  --with-device=/dev/tpm0
 The second option, –with-devicetests, enables a "class" of test. There are three classes:
1.	destructive - these tests can affect TPM capability or lifespan
2.	mandatory - these tests check all the functionality that is mandatory per the TCG specification (default).
3.	optional - these tests are for functionality that is optional per the TCG specification.
For example to enable both mandatory and optional test cases during configure one needs to set this flag as follows:

$ ./configure --with-devicetests="mandatory,optional"
 Tht default value for the flag is "mandatory" Any combination of the three is valid. The two flags are only valid when the integration tests are enabled with –enable-integration flag.
After that the following command is used to run the test on the configured TPM device:

$ sudo make check-device
 or 
$ sudo make check -j 1

Note: The tests can not be run in paralel.
 
The unit and integration tests can be run under the valgrind tool, which performs additional checks on the library and test code, such as memory leak checks etc. The following command is used to run the tests under valgrind:
$ make check-valgrind
This command will enable all valgrind "tools" and kick off as many test as they support. It is possible to enable different valgrind tools (checks) in more granularity. This can be controlled by invoking different tools separately using check-valgrind-<tool>, for instance:

$ make check-valgrind-memcheck
 or 
$ make check-valgrind-drd

Currently the the following tools are supported:
memcheck - Performs memory related checks. This is the default tool. helgrind - Performs synchronization errors checks. drd - Performs thread related checks. sgcheck - Performs stack overrun related checks.
Note that the valgring tool can also be invoked manually using the standard libtool:

$ libtool exec valgrind --tool=memcheck --leak-check=full \
  test/integration/esys-auto-session-flags.int

This allows for more control on what checks are performed.
 
While investigating issues it might be helpful to enable extra debug/trace output. It can be enabled separately for different components. The description how to do this can be found in the logging file.
 
All system API function calls can be tested using a fuzzing library. The description how to do this can be found in the fuzzing file.
 
SAPI library, TAB/RM, and Test Code Block Diagram:   

|-- doc     : various bits of documentation\
|-- include : header files installed in $(includedir)\
|   +-- tss2      : all public headers for this project\
|-- lib     : data files used by the build or installed into $(libdir)\
|-- m4      : autoconf support macros\
|-- man     : man pages\
|-- script  : scripts used by the build or CI\
|-- src     : all source files\
|   |-- tss2-esys : enhanced system API (ESAPI) implementation\
|   |   +-- api   : ESAPI TPM API implementation\
|   |-- tss2-mu   : TPM2 type marshaling/unmarshaling (MU) API implementation\
|   |-- tss2-sys  : system API (SAPI) implementation\
|   |   +-- api   : SAPI public API implementation\
|   |-- tss2-tcti : TCTI implementations for device and mssim\
|   +-- util      : Internal utility library (e.g. logging framework)\
+-- test    : test code\
    |-- integration : integration test harness and test cases\
    |-- tpmclient   : monolithic, legacy test application\
    +-- unit        : unit tests

Coding Standard
The coding standard followed in this code base is similar in most ways to the style followed by the Linux kernel. Naturally there are exceptions. Most notably is the indentation (more on this later). Above all else we ask that when modifying the code that you follow the most important rule: check the surrounding code and imitate its style [1].
 
Code should hold as close to the C99 standard as possible with the exception that GCC specific extensions are generally accepted. The code must compile without warnings for the primary target compiler when all warnings are enabled. If a warning is unavoidable, the offending line must be documented with an explanation of why said code can not be modified to appease the compiler [2].
It is worth noting however that this code base has yet to run into a compiler warning that wasn't the authors fault. It is likely that if you do find yourself disabling -Werror  you're probably doing something wrong.
 
There are two acceptable commenting styles: block, line. Block comments are used to document a largeish block of code, typically a function. Sometimes block comments are useful with a function to document a loop or a particularly tricky part of an algorithm. Line comments are typically a single sentence on a single line. They provide some brief explanation of a line or two of code.
NOTE: Comments are most useful to convey the purpose, parameters and results from functions and objects in a system. Excessive use of comments within a function is indicative of two things: over documentation and code that needs to be refactored. To combat the first case let's say that it's safe to assume that your code will be read by competent C programmers. The second case can be tricky and there's no rule of thumb. Follow your instincts and keep in mind that excessive line comments are a sort of "code smell" that may mean your code would benefit from some restructuring.
### Examples 
/*
 * This block comment could apply to some function and describe its inner
 * workings.  Notice these sentences have traditional capitalization and
 * punctuation... that's because it has to be read in a way completely
 * unlike the Post-It style content of next-line and line comments.
 */
 
// This is *not* an acceptable block comment.
// Don't do this.
// Please.
 
/* This is a line comment */

All indentation must be spaces, not tabs. Lines are indented in multiples of 4 spaces. Each line of code and documentation will end with a non-whitespace character. There must not  be any whitespace between the last line of code or documentation in a file and the end of the file.
 
Names should clearly convey the purpose of whatever is being named. While the data type of a variable conveys some information, this alone is insufficient. Multiple word names are descriptive and most easily read if words are separated with the underscore character, "_".
Variable and function names must be lowercase. Words in each name must be separated by an underscore character: "_". Macros and constants (anything declared with #define) must be in all-caps, again with words separated by underscores.
Objects created using the GObject system follow the GObject naming convention with individual words in object names as upper case characters.
 
Exceptions to these rules are made for compliance with the TCG specifications. All function names, parameters, and other data types must be implemented faithfully to the specification and so may violate the naming conventions defined here.
### Examples 
unsigned int table_index = find_index(jacket_table, "color", COLOR_RED);
 
int last_item = 0;
while (!last_item) {
     /* ... */
}
 
int char_found = is_alpha (c);

Single letter variable names should be avoided. Exceptions are:
"i", "j", and "k" are loop counters or temporary array indexes
"m" and "n" are row and column indexes for multidimensional arrays
"c" and "s" are temporary/parameter characters or strings
"r", "g", "b", and "a" are red, green, blue, and alpha levels, but only when
they are used together
"x", "y", and "z" are coordinate values
Abbreviated words in variable names should be avoided. Exceptions are:
"char" = character
"col" = column. Typically there is also "row" so it is not confused with color
"cnt" = count
"pos" = position
"rem" = remainder
"ctx" = context
Function names should follow the naming conventions of variables and clearly describe not only what the function does, but also the nature of what it returns (if anything). Functions that return boolean integers should be named to reflect the true condition even if they are created to detect false conditions. Functions should never be hidden in conditional statements, with the exception of loops where it makes the code more simple. 
bool is_number_prime = is_prime(i);
 
if (is_number_prime) {
    /* ... */
}
 
while (!labeled_correctly(sample[i])) {
    /* ... */
}

A function that is exported for use in multiple source files should be prefixed with the source file (or object module) name where it is defined. For example, the file list.c may contain the implementation of a dynamic list ADT including an exported method for creating a list instance and an internal (static) method for overflow checking. The first function might be named "list_create", and the second, "is_overflowed".
The use of the static keyword when defining functions is a useful way to scope the visibility of the function to the same translation unit. A negative side effect of this is preventing the testing of the function through the unit testing harness. Generally we accept exposing symbols to get better test coverage.
 
Typically every header file has the same base filename as an associated source file. Exceptions to this rule are generally limited to modules that will expose a separate set symbols to external consumers. In this case the internal version of the header should be suffixed with '-priv'.
Files names are formatted in the same way as described above with the exception of hyphens "-" separating words.
The body of each header file must be surrounded by an include guard (aka "header guard"). These guards shall be given the same name as the file in which they reside. Their names shall be all caps, with words separated by the underscore character "_".
Header files should never define functions or variables.
Header files should only #include what is necessary to allow a file that includes it to compile. Associated source files will always #include the header of the same name, but should #include files whose resources are used within the source even if they are already included in that header. This provides a complete context for readers of the source file... i.e., they don't have to search through headers to determine where a resource came from.
Files included by all source files must conform to the following format and order. Each entry in the list below defines a contiguous block of include  directives separated by a blank line:
System headers - These are headers provided by the core c libraries (typically from libc).
External dependencies - These are headers installed on the platform defining interfaces to external libraries.
Standard TSS2 headers - These are headers that define the public TSS2 types and interfaces. They are all located under /include/* and will be installed as part of the install  build target. These must  be included using the quoted include variant (using "  instead of the angle brackets).
Internal headers - These are headers defining the interfaces to code modules that are internal to the project.
Headers in each block must listed in alphabetical order.
 
header: example-module.h  
/*
 * BSD license block
 */
#ifndef EXAMPLE_MODULE_H
#define EXAMPLE_MODULE_H

#include <stdint.h>
#include <sys/types.h>

#include "tss2/tss2_tpm2_types.h"

#include "internal-module.h"

/*
 * preprocess or directives and declarations using stuff from included headers
 */

#endif /* EXAMPLE_MODULE_H */

implementation: example-module.c  
/*
 * BSD license block
 */
#include <inttypes.h>
#include <stdint.h>

#include <foo/bar.h>

#include "tss2/tss2_tcti.h"
#include "tss2/tss2_tpm2_types.h"

#include "example-module.h"
#include "internal-module.h"

/*
 * Implementation / code using headers listed above.
 */

Types shall be selected for their use case. Variables should only be of a signed type if something should ever be negative. A common, incorrect use, is to declare loop counters as int instead of unsigned, or to use an int to hold the size of some object.
 
Always use space characters, 4 spaces per level of indentation.
Conditional statements (such as if, else, while, for, switch, etc) must place the opening brace on the same line after the end of the control flow statement. The closing brace should be placed at the same column position as the beginning of the associated control flow statement on a line by itself.
Function definitions specify the return type on a line, followed by the function name followed by the first parameter. Each additional parameter is listed on a separate line aligned with the line above. The opening brace defning the functions scope must be on the following line at column position 0.
A space must separate a control flow statement or function and the opening parenthesis.
Line length should not exceed 80 characters and should be split on the nearest whitespace or delimiter character. When splitting lines with
### Example 
if (some_int > 0) {
    statement1;
    statement2;
}
 
void
some_function (short_t       arg_1,
               longer_name_t arg_2)
{
    statement1;
    statement2;
}
 
some_long_variable_name =
    some_long_function_name (lots_of_parameters_1, lots_of_parameters_2);
 
some_long_variable_name = some_long_function_name (lots_of_parameters_1,
                                                   lots_of_parameters_2,
                                                   lots_of_parameters_3);
 These formatting conditions are contrary to Kernighan and Ritchie's "one true brace style" [3].

1.	GNOME C Coding Style : https://developer.gnome.org/programming-guidelines/stable/c-coding-style.html.en
2.	Alan Bridger, Mick Brooks, and Jim Pisano, C Coding Standards, 2001, http://www.alma.nrao.edu/development/computing/docs/joint/0009/2001-02-28.pdf
3.	Brian Kernighan, Dennis Ritchie, The C Programing Language, 1988 

Compile time log levels
At compile time the maximum log level can be specified. This allows distros to disable the overhead code and reduce overall code size.
 
At runtime, the log level is determined by an environment variable. The default log level is WARNING. The level can be changed by setting the TSS2_LOG  environment variable.
Possible levels are: NONE, ERROR, WARNING, INFO, DEBUG, TRACE
The level can be set for all module using the all  module name or individually per module. The environment variable is evaluated left to right.
Example: TSS2_LOG=all+ERROR,marshal+TRACE,tcti+DEBUG 
 
By default, logs are written to standard error (stderr ). If the environment variable TSS2_LOGFILE  is set, the TSS will log to the file at the given path instead. If the file does not yet exist, it will be created. Otherwise, the TSS will append to it.
The special value stderr  will result in default behavior while stdout  and -  will have the TSS write to standard output.
 
Each source code file specifies its corresponding module before including log.h. 
#define LOGMODULE tcti
#include "log.h"
 Optionally, the default log-level for this module can be set: 
#define LOGMODULE tcti
#define LOGDEFAULT ERROR
#include "log.h"

Todo List
Module iesys_util  
Description and Documentat of functions

Module Index
Modules
Here is a list of all modules:
Enhanced System API	pagenum
Esys Context ESYS_CONTEXT	pagenum
Esys Tpm Resource ESYS_TR	pagenum
Global ESYS_TR objects	pagenum

Esys TPM Commands	pagenum
The ESAPI function for the TPM2_ActivateCredential command.	pagenum
The ESAPI function for the TPM2_Certify command.	pagenum
The ESAPI function for the TPM2_CertifyCreation command.	pagenum
The ESAPI function for the TPM2_ChangeEPS command.	pagenum
The ESAPI function for the TPM2_ChangePPS command.	pagenum
The ESAPI function for the TPM2_Clear command.	pagenum
The ESAPI function for the TPM2_ClearControl command.	pagenum
The ESAPI function for the TPM2_ClockRateAdjust command.	pagenum
The ESAPI function for the TPM2_ClockSet command.	pagenum
The ESAPI function for the TPM2_Commit command.	pagenum
The ESAPI function for the TPM2_ContextLoad command.	pagenum
The ESAPI function for the TPM2_ContextSave command.	pagenum
The ESAPI function for the TPM2_Create command.	pagenum
The ESAPI function for the TPM2_CreatePrimary command.	pagenum
The ESAPI function for the TPM2_DictionaryAttackLockReset command.	pagenum
The ESAPI function for the TPM2_DictionaryAttackParameters command.	pagenum
The ESAPI function for the TPM2_Duplicate command.	pagenum
The ESAPI function for the TPM2_ECC_Parameters command.	pagenum
The ESAPI function for the TPM2_ECDH_KeyGen command.	pagenum
The ESAPI function for the TPM2_ECDH_ZGen command.	pagenum
The ESAPI function for the TPM2_EC_Ephemeral command.	pagenum
The ESAPI function for the TPM2_EncryptDecrypt command.	pagenum
The ESAPI function for the TPM2_EventSequenceComplete command.	pagenum
The ESAPI function for the TPM2_EvictControl command.	pagenum
The ESAPI function for the TPM2_FlushContext command.	pagenum
The ESAPI function for the TPM2_GetCapability command.	pagenum
The ESAPI function for the TPM2_GetCommandAuditDigest command.	pagenum
The ESAPI function for the TPM2_GetRandom command.	pagenum
The ESAPI function for the TPM2_GetSessionAuditDigest command.	pagenum
The ESAPI function for the TPM2_GetTestResult command.	pagenum
The ESAPI function for the TPM2_GetTime command.	pagenum
The ESAPI function for the TPM2_Hash command.	pagenum
The ESAPI function for the TPM2_HashSequenceStart command.	pagenum
The ESAPI function for the TPM2_HierarchyChangeAuth command.	pagenum
The ESAPI function for the TPM2_HierarchyControl command.	pagenum
The ESAPI function for the TPM2_HMAC command.	pagenum
The ESAPI function for the TPM2_HMAC_Start command.	pagenum
The ESAPI function for the TPM2_Import command.	pagenum
The ESAPI function for the TPM2_IncrementalSelfTest command.	pagenum
The ESAPI function for the TPM2_Load command.	pagenum
The ESAPI function for the TPM2_LoadExternal command.	pagenum
The ESAPI function for the TPM2_MakeCredential command.	pagenum
The ESAPI function for the TPM2_NV_Certify command.	pagenum
The ESAPI function for the TPM2_NV_ChangeAuth command.	pagenum
The ESAPI function for the TPM2_NV_DefineSpace command.	pagenum
The ESAPI function for the TPM2_NV_Extend command.	pagenum
The ESAPI function for the TPM2_NV_GlobalWriteLock command.	pagenum
The ESAPI function for the TPM2_NV_Increment command.	pagenum
The ESAPI function for the TPM2_NV_Read command.	pagenum
The ESAPI function for the TPM2_NV_ReadLock command.	pagenum
The ESAPI function for the TPM2_NV_ReadPublic command.	pagenum
The ESAPI function for the TPM2_NV_SetBits command.	pagenum
The ESAPI function for the TPM2_NV_UndefineSpace command.	pagenum
The ESAPI function for the TPM2_NV_UndefineSpaceSpecial command.	pagenum
The ESAPI function for the TPM2_NV_Write command.	pagenum
The ESAPI function for the TPM2_NV_WriteLock command.	pagenum
The ESAPI function for the TPM2_ObjectChangeAuth command.	pagenum
The ESAPI function for the TPM2_PCR_Allocate command.	pagenum
The ESAPI function for the TPM2_PCR_Event command.	pagenum
The ESAPI function for the TPM2_PCR_Extend command.	pagenum
The ESAPI function for the TPM2_PCR_Read command.	pagenum
The ESAPI function for the TPM2_PCR_Reset command.	pagenum
The ESAPI function for the TPM2_PCR_SetAuthPolicy command.	pagenum
The ESAPI function for the TPM2_PCR_SetAuthValue command.	pagenum
The ESAPI function for the TPM2_PolicyAuthorize command.	pagenum
The ESAPI function for the TPM2_PolicyAuthValue command.	pagenum
The ESAPI function for the TPM2_PolicyCommandCode command.	pagenum
The ESAPI function for the TPM2_PolicyCounterTimer command.	pagenum
The ESAPI function for the TPM2_PolicyCpHash command.	pagenum
The ESAPI function for the TPM2_PolicyDuplicationSelect command.	pagenum
The ESAPI function for the TPM2_PolicyGetDigest command.	pagenum
The ESAPI function for the TPM2_PolicyLocality command.	pagenum
The ESAPI function for the TPM2_PolicyNameHash command.	pagenum
The ESAPI function for the TPM2_PolicyNV command.	pagenum
The ESAPI function for the TPM2_PolicyNvWritten command.	pagenum
The ESAPI function for the TPM2_PolicyOR command.	pagenum
The ESAPI function for the TPM2_PolicyPassword command.	pagenum
The ESAPI function for the TPM2_PolicyPCR command.	pagenum
The ESAPI function for the TPM2_PolicyPhysicalPresence command.	pagenum
The ESAPI function for the TPM2_PolicyRestart command.	pagenum
The ESAPI function for the TPM2_PolicySecret command.	pagenum
The ESAPI function for the TPM2_PolicySigned command.	pagenum
The ESAPI function for the TPM2_PolicyTicket command.	pagenum
The ESAPI function for the TPM2_PP_Commands command.	pagenum
The ESAPI function for the TPM2_Quote command.	pagenum
The ESAPI function for the TPM2_ReadClock command.	pagenum
The ESAPI function for the TPM2_ReadPublic command.	pagenum
The ESAPI function for the TPM2_Rewrap command.	pagenum
The ESAPI function for the TPM2_RSA_Decrypt command.	pagenum
The ESAPI function for the TPM2_RSA_Encrypt command.	pagenum
The ESAPI function for the TPM2_SelfTest command.	pagenum
The ESAPI function for the TPM2_SequenceComplete command.	pagenum
The ESAPI function for the TPM2_SequenceUpdate command.	pagenum
The ESAPI function for the TPM2_SetAlgorithmSet command.	pagenum
The ESAPI function for the TPM2_SetCommandCodeAuditStatus command.	pagenum
The ESAPI function for the TPM2_SetPrimaryPolicy command.	pagenum
The ESAPI function for the TPM2_Shutdown command.	pagenum
The ESAPI function for the TPM2_Sign command.	pagenum
The ESAPI function for the TPM2_StartAuthSession command.	pagenum
The ESAPI function for the TPM2_Startup command.	pagenum
The ESAPI function for the TPM2_StirRandom command.	pagenum
The ESAPI function for the TPM2_TestParms command.	pagenum
The ESAPI function for the TPM2_Unseal command.	pagenum
The ESAPI function for the TPM2_Vendor_TCG_Test command.	pagenum
The ESAPI function for the TPM2_VerifySignature command.	pagenum
The ESAPI function for the TPM2_ZGen_2Phase command.	pagenum

Internals of Enhanced System API	pagenum
Internal ESAPI Types	pagenum
Internal Cryptographic Backend	pagenum
Internal ESAPI utility functions.	pagenum

Testing	pagenum
Esys-Testing	pagenum
Fapi-Testing	pagenum

Feature API	pagenum
Fapi_Initialize	pagenum
Fapi_Finalize	pagenum
Fapi_GetTcti	pagenum
Fapi_GetPollHandles	pagenum
Fapi_Free	pagenum
Fapi_GetInfo	pagenum
Fapi_Provision	pagenum
Fapi_GetPlatformCertificates	pagenum
Fapi_GetEsysBlobs	pagenum
Fapi_GetRandom	pagenum
Fapi_Import	pagenum
Fapi_List	pagenum
Fapi_Delete	pagenum
Fapi_ChangeAuth	pagenum
Fapi_SetDescription	pagenum
Fapi_GetDescription	pagenum
Fapi_SetAppData	pagenum
Fapi_GetAppData	pagenum
Fapi_GetTpmBlobs	pagenum
Fapi_CreateKey	pagenum
Fapi_Sign	pagenum
Fapi_VerifySignature	pagenum
Fapi_Encrypt	pagenum
Fapi_Decrypt	pagenum
Fapi_SetCertificate	pagenum
Fapi_GetCertificate	pagenum
Fapi_ExportKey	pagenum
Fapi_CreateSeal	pagenum
Fapi_Unseal	pagenum
Fapi_ExportPolicy	pagenum
Fapi_AuthorizePolicy	pagenum
Fapi_WriteAuthorizeNv	pagenum
Fapi_PcrRead	pagenum
Fapi_PcrExtend	pagenum
Fapi_Quote	pagenum
Fapi_VerifyQuote	pagenum
Fapi_CreateNv	pagenum
Fapi_NvRead	pagenum
Fapi_NvWrite	pagenum
Fapi_NvExtend	pagenum
Fapi_NvIncrement	pagenum
Fapi_NvSetBits	pagenum
Fapi_SetAuthCB	pagenum
Fapi_SetBranchCB	pagenum
Fapi_SetSignCB	pagenum
Internals of Feature API	pagenum
Internal Cryptographic Backend	pagenum
Policy instantiation module	pagenum
Policy calculation module	pagenum
Policy callback functions.	pagenum
Policy execution functions.	pagenum
Policy utilitiy module	pagenum
Helper functions module	pagenum
Utility module	pagenum
Basic IO module	pagenum
Key store module	pagenum
Policy store module	pagenum
Configuration utilities.	pagenum
Event log utilities.	pagenum
Profile module	pagenum
FAPI object serialization module	pagenum
FAPI object deserialization module	pagenum
Vendor specific module	pagenum

Data Structure Index
Data Structures
Here are the data structures with brief descriptions:
_IESYS_CRYPTO_CONTEXT  	pagenum
_IFAPI_CRYPTO_CONTEXT  	pagenum
_IFAPI_OBJECT  	pagenum
CurlBufferStruct  	pagenum
FAPI_CONTEXT  	pagenum
FAPI_QUOTE_INFO  	pagenum
IFAPI_api_WriteAuthorizeNv  	pagenum
IFAPI_CALLBACKS  	pagenum
IFAPI_CAP_INFO  	pagenum
IFAPI_CMD_STATE  	pagenum
IFAPI_CONFIG  	pagenum
IFAPI_CreatePrimary  	pagenum
IFAPI_Data_EncryptDecrypt  	pagenum
IFAPI_DUPLICATE  	pagenum
IFAPI_Entities_List  	pagenum
IFAPI_Entity_ChangeAuth  	pagenum
IFAPI_Entity_Delete  	pagenum
IFAPI_EVENT  	pagenum
IFAPI_EVENT_TYPE_ASSIGN  	pagenum
IFAPI_EVENT_UNION  	pagenum
IFAPI_EVENTLOG  	pagenum
IFAPI_ExportKey  	pagenum
IFAPI_ExportPolicy  	pagenum
IFAPI_EXT_PUB_KEY  	pagenum
IFAPI_Fapi_AuthorizePolicy  	pagenum
IFAPI_FILE_SEARCH_CTX  	pagenum
IFAPI_GetEsysBlob  	pagenum
IFAPI_GetInfo  	pagenum
IFAPI_GetRandom  	pagenum
IFAPI_HIERARCHY  	pagenum
IFAPI_IFAPI_EVENT_TYPE_ASSIGN  	pagenum
IFAPI_IMA_EVENT  	pagenum
IFAPI_ImportKey  	pagenum
IFAPI_INFO  	pagenum
IFAPI_INFO_CAP  	pagenum
IFAPI_INITIALIZE  	pagenum
IFAPI_IO  	pagenum
IFAPI_KEY  	pagenum
IFAPI_Key_Create  	pagenum
IFAPI_KEY_SEARCH  	pagenum
IFAPI_Key_SetCertificate  	pagenum
IFAPI_Key_Sign  	pagenum
IFAPI_KEY_TEMPLATE  	pagenum
IFAPI_Key_VerifySignature  	pagenum
IFAPI_KEYSTORE  	pagenum
IFAPI_LoadKey  	pagenum
IFAPI_MAX_BUFFER  	pagenum
IFAPI_NV  	pagenum
IFAPI_NV_Cmds  	pagenum
IFAPI_NV_TEMPLATE  	pagenum
IFAPI_OBJECT_UNION  	pagenum
IFAPI_Path_SetDescription  	pagenum
IFAPI_PCR  	pagenum
IFAPI_POLICY_CTX  	pagenum
IFAPI_POLICY_EVAL_INST_CTX  	pagenum
IFAPI_POLICY_EXEC_CB_CTX  	pagenum
IFAPI_POLICY_EXEC_CTX  	pagenum
IFAPI_POLICY_STORE  	pagenum
ifapi_policyeval_EXEC_CB  	pagenum
ifapi_policyeval_INST_CB  	pagenum
IFAPI_POLICYUTIL_STACK  	pagenum
IFAPI_PROFILE  	pagenum
IFAPI_PROFILE_ENTRY  	pagenum
IFAPI_PROFILES  	pagenum
IFAPI_Provision  	pagenum
IFAPI_TPMI_POLICYTYPE_ASSIGN  	pagenum
IFAPI_TSS_EVENT  	pagenum
IFAPI_Unseal  	pagenum
object_node  	pagenum
POLICY_LIST  	pagenum
policy_object_node  	pagenum
str_node  	pagenum
tpm_getekcertificate_ctx  	pagenum
TPMI_POLICYTYPE_ASSIGN  	pagenum
TPML_PCRVALUES  	pagenum
TPML_POLICYAUTHORIZATIONS  	pagenum
TPML_POLICYBRANCHES  	pagenum
TPML_POLICYELEMENTS  	pagenum
TPMS_PCRVALUE  	pagenum
TPMS_POLICY  	pagenum
TPMS_POLICYACTION  	pagenum
TPMS_POLICYAUTHORIZATION  	pagenum
TPMS_POLICYAUTHORIZE  	pagenum
TPMS_POLICYAUTHORIZENV  	pagenum
TPMS_POLICYAUTHVALUE  	pagenum
TPMS_POLICYBRANCH  	pagenum
TPMS_POLICYCOMMANDCODE  	pagenum
TPMS_POLICYCOUNTERTIMER  	pagenum
TPMS_POLICYCPHASH  	pagenum
TPMS_POLICYDUPLICATIONSELECT  	pagenum
TPMS_POLICYLOCALITY  	pagenum
TPMS_POLICYNAMEHASH  	pagenum
TPMS_POLICYNV  	pagenum
TPMS_POLICYNVWRITTEN  	pagenum
TPMS_POLICYOR  	pagenum
TPMS_POLICYPASSWORD  	pagenum
TPMS_POLICYPCR  	pagenum
TPMS_POLICYPHYSICALPRESENCE  	pagenum
TPMS_POLICYSECRET  	pagenum
TPMS_POLICYSIGNED  	pagenum
TPMS_POLICYTEMPLATE  	pagenum
TPMT_POLICYELEMENT  	pagenum
TPMU_POLICYELEMENT  	pagenum
UINT8_ARY  	pagenum

Module Documentation
Enhanced System API
Modules
Esys Context ESYS_CONTEXT
Esys Tpm Resource ESYS_TR
Esys TPM Commands
Internals of Enhanced System API

Detailed Description
Enhanced System API (ESAPI) as described in the TSS 2.0 Enhanced System API (ESAPI) Specification. This API is a 1-to-1 mapping of the TPM2 commands documented in Part 3 of the TPM2 specification. Additionally there are asynchronous versions of each command. In addition to SAPI, the ESAPI performs tracking of meta data for TPM object and automatic calculation of session based authorization and encryption values. Both the synchronous and asynchronous API are exposed through a single library: libtss2-esys. 

Esys Context ESYS_CONTEXT
Typedefs
typedef struct ESYS_CONTEXT ESYS_CONTEXT
Functions
TSS2_RC Esys_Initialize (ESYS_CONTEXT **esys_context, TSS2_TCTI_CONTEXT *tcti, TSS2_ABI_VERSION *abiVersion)
TSS2_RC Esys_GetTcti (ESYS_CONTEXT *esys_context, TSS2_TCTI_CONTEXT **tcti)
TSS2_RC Esys_GetPollHandles (ESYS_CONTEXT *esys_context, TSS2_TCTI_POLL_HANDLE **handles, size_t *count)
TSS2_RC Esys_SetTimeout (ESYS_CONTEXT *esys_context, int32_t timeout)
TSS2_RC Esys_GetSysContext (ESYS_CONTEXT *esys_context, TSS2_SYS_CONTEXT **sys_context)
void Esys_Free (void *__ptr)

Detailed Description
An ESYS_CONTEXT holds tdata for the connection to the TPM as well as the metadata for TPM Resource; such as Transient key, Persistent objects, NV spaces, Sessions or PCRs. 

Typedef Documentation
ESYS_CONTEXT
Reference to the ESYS_CONTEXT that holds data for the connection to the TPM as well as the metadata for TPM Resource; such as Transient key, Persistent objects, NV spaces, Sessions or PCRs. 

Function Documentation
TSS2_RC Esys_GetPollHandles (ESYS_CONTEXT *  esys_context, TSS2_TCTI_POLL_HANDLE **  handles, size_t *  count)
Return the poll handles of the used TCTI.
The connection to the TPM is held using a TCTI. These may optionally provide handles that can be used to poll for incoming data. This is useful when using the asynchronous function of ESAPI in an event-loop model. 
Parameters:
esys_context 	[in] The ESYS_CONTEXT. 	
handles 	[out] The poll handles (callee-allocated, use free()) 	
count 	[out] The number of poll handles. 	
Return values:
TSS2_RC_SUCCESS 	on Success. 	
TSS2_ESYS_RC_BAD_REFERENCE 	if esysContext, handles or count is NULL. 	
TSS2_RCs 	produced by lower layers of the software stack. 	
TSS2_RC Esys_GetSysContext (ESYS_CONTEXT *  esys_context, TSS2_SYS_CONTEXT **  sys_context)
Helper function that returns sys contest from the give esys context.
Function returns sys contest from the give esys context. 
Parameters:
esys_context 	[in] ESYS context. 	
sys_context 	[out] SYS context. 	
Return values:
TSS2_RC_SUCCESS 	on Success. 	
TSS2_ESYS_RC_BAD_REFERENCE 	if esys_context of sys_context are NULL. 	
TSS2_RC Esys_GetTcti (ESYS_CONTEXT *  esys_context, TSS2_TCTI_CONTEXT **  tcti)
Return the used TCTI context.
If a tcti context was passed into Esys_Initialize then this tcti context is return. If NULL was passed in, then NULL will be returned. This function is useful before Esys_Finalize to retrieve the tcti context and perform a clean Tss2_Tcti_Finalize. 
Parameters:
esys_context 	[in] The ESYS_CONTEXT. 	
tcti 	[out] The TCTI context used to connect to the TPM (may be NULL). 	
Return values:
TSS2_RC_SUCCESS 	on Success. 	
TSS2_ESYS_RC_BAD_REFERENCE 	if esysContext or tcti is NULL. 	
TSS2_RC Esys_Initialize (ESYS_CONTEXT **  esys_context, TSS2_TCTI_CONTEXT *  tcti, TSS2_ABI_VERSION *  abiVersion)
Initialize an ESYS_CONTEXT for further use.
Initialize an ESYS_CONTEXT that holds all the state and metadata information during an interaction with the TPM. If not specified, load a TCTI in this order: Library libtss2-tcti-default.so (link to the preferred TCTI) Library libtss2-tcti-tabrmd.so (tabrmd) Device /dev/tpmrm0 (kernel resident resource manager) Device /dev/tpm0 (hardware TPM) TCP socket localhost:2321 (TPM simulator) 
Parameters:
esys_context 	[out] The ESYS_CONTEXT. 	
tcti 	[in] The TCTI context used to connect to the TPM (may be NULL). 	
abiVersion 	[in,out] The abi version to check and the abi version supported by this implementation (may be NULL). 	
Return values:
TSS2_ESYS_RC_SUCCESS 	if the function call was a success. 	
TSS2_ESYS_RC_BAD_REFERENCE 	if esysContext is NULL. 	
TSS2_ESYS_RC_MEMORY 	if the ESAPI cannot allocate enough memory to create the context. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_SetTimeout (ESYS_CONTEXT *  esys_context, int32_t  timeout)
Set the timeout of Esys asynchronous functions.
Sets the timeout for the _finish() functions in the asynchronous versions of the Esys commands. 
Parameters:
esys_context 	[in] The ESYS_CONTEXT. 	
timeout 	[in] The timeout in ms or -1 to block indefinately. 	
Return values:
TSS2_RC_SUCCESS 	on Success. 	
TSS2_ESYS_RC_BAD_REFERENCE 	if esysContext is NULL. 	

Esys Tpm Resource ESYS_TR
Modules
Global ESYS_TR objects
Typedefs
typedef uint32_t ESYS_TR
Functions
TSS2_RC Esys_TR_SetAuth (ESYS_CONTEXT *esysContext, ESYS_TR handle, TPM2B_AUTH const *authValue)
TSS2_RC Esys_TR_GetName (ESYS_CONTEXT *esysContext, ESYS_TR handle, TPM2B_NAME **name)
TSS2_RC Esys_TR_FromTPMPublic_Async (ESYS_CONTEXT *esysContext, TPM2_HANDLE tpm_handle, ESYS_TR optionalSession1, ESYS_TR optionalSession2, ESYS_TR optionalSession3)
TSS2_RC Esys_TR_FromTPMPublic_Finish (ESYS_CONTEXT *esysContext, ESYS_TR *object)
TSS2_RC Esys_TR_FromTPMPublic (ESYS_CONTEXT *esysContext, TPM2_HANDLE tpm_handle, ESYS_TR optionalSession1, ESYS_TR optionalSession2, ESYS_TR optionalSession3, ESYS_TR *object)
TSS2_RC Esys_TR_Serialize (ESYS_CONTEXT *esys_context, ESYS_TR object, uint8_t **buffer, size_t *buffer_size)
TSS2_RC Esys_TR_Deserialize (ESYS_CONTEXT *esys_context, uint8_t const *buffer, size_t buffer_size, ESYS_TR *esys_handle)
TSS2_RC Esys_TR_Close (ESYS_CONTEXT *esys_context, ESYS_TR *rsrc_handle)
TSS2_RC Esys_TRSess_GetAttributes (ESYS_CONTEXT *esysContext, ESYS_TR session, TPMA_SESSION *flags)
TSS2_RC Esys_TRSess_SetAttributes (ESYS_CONTEXT *esysContext, ESYS_TR session, TPMA_SESSION flags, TPMA_SESSION mask)

Detailed Description
Virtual objects with meta data for Tpm Resources. The Esys TPM Resources are the virtual objects inside the ESYSCONTEXT that hold the metadata for corresponding TPM Resources.
There are a set of global ESYS_TR objects such as ESYS_TR_NON or for the various PCRs and hierarchies. ESYS_TR_MIN_OBJECT denotes the first non-global ESYS_TR object. 

Typedef Documentation
ESYS_TR
Reference to the virtual object inside the ESYS_CONTEXT that holds the metadata for the corresponding TPM Resource. Such can be Transient key, Persistent objects, NV spaces, Sessions or PCRs. 

Function Documentation
TSS2_RC Esys_TR_Close (ESYS_CONTEXT *  esys_context, ESYS_TR *  object)
Close an ESYS_TR without removing it from the TPM.
This function deletes an ESYS_TR object from an ESYS_CONTEXT without deleting it from the TPM. This is useful for NV-Indices or persistent keys, after Esys_TR_Serialize has been called. Transient objects should be deleted using Esys_FlushContext. 
Parameters:
esys_context 	[in,out] The ESYS_CONTEXT 	
object 	[out] ESYS_TR metadata object to be deleted from ESYS_CONTEXT. 	
Return values:
TSS2_RC_SUCCESS 	on Success. 	
TSS2_ESYS_RC_BAD_REFERENCE 	if the esysContext is NULL. 	
TSS2_ESYS_RC_BAD_TR 	if the ESYS_TR object is unknown to the ESYS_CONTEXT. 	
TSS2_RC Esys_TR_Deserialize (ESYS_CONTEXT *  esys_context, uint8_t const *  buffer, size_t  buffer_size, ESYS_TR *  esys_handle)
Deserialization of an ESYS_TR from a byte buffer.
Deserialize the metadata of an ESYS_TR object from a byte buffer that was stored on disk for later use by a different program or context. An object can be deserialized using Esys_TR_Deserialize. 
Parameters:
esys_context 	[in,out] The ESYS_CONTEXT. 	
esys_handle 	[out] The ESYS_TR object to deserialize. 	
buffer 	[in] The buffer containing the metadata of the ESYS_TR object. 	
buffer_size 	[in] The size of the buffer parameter. 	
Return values:
TSS2_RC_SUCCESS 	on Success. 	
TSS2_ESYS_RC_MEMORY 	if the object can not be allocated. 	
TSS2_ESYS_RC_INSUFFICIENT_BUFFER 	if the buffer for unmarshalling. 	
TSS2_ESYS_RC_BAD_REFERENCE 	if the esysContext is NULL. 	
TSS2_RCs 	produced by lower layers of the software stack. 	
TSS2_RC Esys_TR_FromTPMPublic (ESYS_CONTEXT *  esys_context, TPM2_HANDLE  tpm_handle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, ESYS_TR *  object)
Creation of an ESYS_TR object from TPM metadata.
This function can be used to create ESYS_TR object for Tpm Resources that are not created or loaded (e.g. using ESys_CreatePrimary or ESys_Load) but pre-exist inside the TPM. Examples are NV-Indices or persistent object.
Note: For PCRs and hierarchies, please use the global ESYS_TR identifiers. Note: If a session is provided the TPM is queried for the metadata twice. First without a session to retrieve some metadata then with the session where this metadata is used in the session HMAC calculation and thereby verified.
Since man in the middle attacks should be prevented as much as possible it is recommended to pass a session. 
Parameters:
esys_context 	[in,out] The ESYS_CONTEXT 	
tpm_handle 	[in] The handle of the TPM object to represent as ESYS_TR. 	
shandle1 	[in,out] A session for securing the TPM command (optional). 	
shandle2 	[in,out] A session for securing the TPM command (optional). 	
shandle3 	[in,out] A session for securing the TPM command (optional). 	
object 	[out] The newly created ESYS_TR metadata object. 	
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_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_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_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_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_TR_FromTPMPublic_Async (ESYS_CONTEXT *  esys_context, TPM2_HANDLE  tpm_handle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
Start synchronous creation of an ESYS_TR object from TPM metadata.
This function starts the asynchronous retrieval of metadata from the TPM in order to create a new ESYS_TR object. 
Parameters:
esys_context 	[in,out] The ESYS_CONTEXT 	
tpm_handle 	[in] The handle of the TPM object to represent as ESYS_TR. 	
shandle1 	[in,out] A session for securing the TPM command (optional). 	
shandle2 	[in,out] A session for securing the TPM command (optional). 	
shandle3 	[in,out] A session for securing the TPM command (optional). 	
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 is 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_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_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_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_TR_FromTPMPublic_Finish (ESYS_CONTEXT *  esys_context, ESYS_TR *  object)
Finish asynchronous creation of an ESYS_TR object from TPM metadata.
This function finishes the asynchronous retrieval of metadata from the TPM in order to create a new ESYS_TR object. 
Parameters:
esys_context 	[in,out] The ESYS_CONTEXT 	
object 	[out] The newly created ESYS_TR metadata object. 	
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_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. 	
TSS2_RC Esys_TR_GetName (ESYS_CONTEXT *  esys_context, ESYS_TR  esys_handle, TPM2B_NAME **  name)
Retrieve the TPM public name of an Esys_TR object.
Some operations (i.e. Esys_PolicyNameHash) require the name of a TPM object to be passed. Esys_TR_GetName provides this name to the caller. 
Parameters:
esys_context 	[in,out] The ESYS_CONTEXT. 	
esys_handle 	[in,out] The ESYS_TR for which to retrieve the name. 	
name 	[out] The name of the object (caller-allocated; use free()). 	
Return values:
TSS2_RC_SUCCESS 	on Success. 	
TSS2_ESYS_RC_MEMORY 	if needed memory can't be allocated. 	
TSS2_ESYS_RC_GENERAL_FAILURE 	for errors of the crypto library. 	
TSS2_ESYS_RC_BAD_REFERENCE 	if the esysContext is NULL. 	
TSS2_ESYS_RC_BAD_TR 	if the handle is invalid. 	
TSS2_SYS_RC_* 	for SAPI errors. 	
TSS2_RC Esys_TR_Serialize (ESYS_CONTEXT *  esys_context, ESYS_TR  esys_handle, uint8_t **  buffer, size_t *  buffer_size)
Serialization of an ESYS_TR into a byte buffer.
Serialize the metadata of an ESYS_TR object into a byte buffer such that it can be stored on disk for later use by a different program or context. The serialized object can be deserialized suing Esys_TR_Deserialize. 
Parameters:
esys_context 	[in,out] The ESYS_CONTEXT. 	
esys_handle 	[in] The ESYS_TR object to serialize. 	
buffer 	[out] The buffer containing the serialized metadata. (caller-callocated) Shall be freed using free(). 	
buffer_size 	[out] The size of the buffer parameter. 	
Return values:
TSS2_RC_SUCCESS 	on Success. 	
TSS2_ESYS_RC_BAD_TR 	if the ESYS_TR object is unknown to the ESYS_CONTEXT. 	
TSS2_ESYS_RC_MEMORY 	if the buffer for marshaling the object can't be allocated. 	
TSS2_ESYS_RC_BAD_VALUE 	For invalid ESYS data to be marshaled. 	
TSS2_RCs 	produced by lower layers of the software stack. 	
TSS2_RC Esys_TR_SetAuth (ESYS_CONTEXT *  esys_context, ESYS_TR  esys_handle, TPM2B_AUTH const *  authValue)
Set the authorization value of an ESYS_TR.
Authorization values are associated with ESYS_TR Tpm Resource object. They are then picked up whenever an authorization is needed.
Note: The authorization value is not stored in the metadata during Esys_TR_Serialize. Therefor Esys_TR_SetAuth needs to be called again after every Esys_TR_Deserialize. 
Parameters:
esys_context 	[in,out] The ESYS_CONTEXT. 	
esys_handle 	[in,out] The ESYS_TR for which to set the auth value. 	
authValue 	[in] The auth value to set for the ESYS_TR or NULL to zero the auth. 	
Return values:
TSS2_RC_SUCCESS 	on Success. 	
TSS2_ESYS_RC_BAD_REFERENCE 	if the esysContext is NULL. 	
TSS2_ESYS_RC_BAD_TR 	if the ESYS_TR object is unknown to the ESYS_CONTEXT. 	
TSS2_RC Esys_TRSess_GetAttributes (ESYS_CONTEXT *  esys_context, ESYS_TR  esys_handle, TPMA_SESSION *  flags)
Retrieve the Session Attributes of the ESYS_TR session.
Sessions possess attributes, such as whether they shall continue of be flushed after the next command, or whether they are used to encrypt parameters. Note: this function only applies to ESYS_TR objects that represent sessions. 
Parameters:
esys_context 	[in,out] The ESYS_CONTEXT. 	
esys_handle 	[in,out] The ESYS_TR of the session. 	
flags 	[out] The attributes of the session. 	
Return values:
TSS2_ESYS_RC_BAD_REFERENCE 	if the esysContext is NULL. 	
TSS2_ESYS_RC_BAD_TR 	if the ESYS_TR object is unknown to the ESYS_CONTEXT or ESYS_TR object is not a session object. 	
TSS2_RC Esys_TRSess_SetAttributes (ESYS_CONTEXT *  esys_context, ESYS_TR  esys_handle, TPMA_SESSION  flags, TPMA_SESSION  mask)
Set session attributes
Set or unset a session's attributes according to the provided flags and mask. 
new_attributes = old_attributes & ~mask | flags & mask  Note: this function only applies to ESYS_TR objects that represent sessions. 
Parameters:
esys_context 	[in,out] The ESYS_CONTEXT. 	
esys_handle 	[in,out] The ESYS_TR of the session. 	
flags 	[in] The flags to be set or unset for the session. 	
mask 	[in] The mask for the flags to be set or unset. 	
Return values:
TSS2_RC_SUCCESS 	on Success. 	
TSS2_ESYS_RC_BAD_REFERENCE 	if the esysContext is NULL. 	
TSS2_ESYS_RC_BAD_TR 	if the ESYS_TR object is unknown to the ESYS_CONTEXT or ESYS_TR object is not a session object. 	

Global ESYS_TR objects
A set of defines for global virtual objects that are always present in every ESYS_CONTEXT. 

Esys TPM Commands
Modules
The ESAPI function for the TPM2_ActivateCredential command.
The ESAPI function for the TPM2_Certify command.
The ESAPI function for the TPM2_CertifyCreation command.
The ESAPI function for the TPM2_ChangeEPS command.
The ESAPI function for the TPM2_ChangePPS command.
The ESAPI function for the TPM2_Clear command.
The ESAPI function for the TPM2_ClearControl command.
The ESAPI function for the TPM2_ClockRateAdjust command.
The ESAPI function for the TPM2_ClockSet command.
The ESAPI function for the TPM2_Commit command.
The ESAPI function for the TPM2_ContextLoad command.
The ESAPI function for the TPM2_ContextSave command.
The ESAPI function for the TPM2_Create command.
The ESAPI function for the TPM2_CreatePrimary command.
The ESAPI function for the TPM2_DictionaryAttackLockReset command.
The ESAPI function for the TPM2_DictionaryAttackParameters command.
The ESAPI function for the TPM2_Duplicate command.
The ESAPI function for the TPM2_ECC_Parameters command.
The ESAPI function for the TPM2_ECDH_KeyGen command.
The ESAPI function for the TPM2_ECDH_ZGen command.
The ESAPI function for the TPM2_EC_Ephemeral command.
The ESAPI function for the TPM2_EncryptDecrypt command.
The ESAPI function for the TPM2_EventSequenceComplete command.
The ESAPI function for the TPM2_EvictControl command.
The ESAPI function for the TPM2_FlushContext command.
The ESAPI function for the TPM2_GetCapability command.
The ESAPI function for the TPM2_GetCommandAuditDigest command.
The ESAPI function for the TPM2_GetRandom command.
The ESAPI function for the TPM2_GetSessionAuditDigest command.
The ESAPI function for the TPM2_GetTestResult command.
The ESAPI function for the TPM2_GetTime command.
The ESAPI function for the TPM2_Hash command.
The ESAPI function for the TPM2_HashSequenceStart command.
The ESAPI function for the TPM2_HierarchyChangeAuth command.
The ESAPI function for the TPM2_HierarchyControl command.
The ESAPI function for the TPM2_HMAC command.
The ESAPI function for the TPM2_HMAC_Start command.
The ESAPI function for the TPM2_Import command.
The ESAPI function for the TPM2_IncrementalSelfTest command.
The ESAPI function for the TPM2_Load command.
The ESAPI function for the TPM2_LoadExternal command.
The ESAPI function for the TPM2_MakeCredential command.
The ESAPI function for the TPM2_NV_Certify command.
The ESAPI function for the TPM2_NV_ChangeAuth command.
The ESAPI function for the TPM2_NV_DefineSpace command.
The ESAPI function for the TPM2_NV_Extend command.
The ESAPI function for the TPM2_NV_GlobalWriteLock command.
The ESAPI function for the TPM2_NV_Increment command.
The ESAPI function for the TPM2_NV_Read command.
The ESAPI function for the TPM2_NV_ReadLock command.
The ESAPI function for the TPM2_NV_ReadPublic command.
The ESAPI function for the TPM2_NV_SetBits command.
The ESAPI function for the TPM2_NV_UndefineSpace command.
The ESAPI function for the TPM2_NV_UndefineSpaceSpecial command.
The ESAPI function for the TPM2_NV_Write command.
The ESAPI function for the TPM2_NV_WriteLock command.
The ESAPI function for the TPM2_ObjectChangeAuth command.
The ESAPI function for the TPM2_PCR_Allocate command.
The ESAPI function for the TPM2_PCR_Event command.
The ESAPI function for the TPM2_PCR_Extend command.
The ESAPI function for the TPM2_PCR_Read command.
The ESAPI function for the TPM2_PCR_Reset command.
The ESAPI function for the TPM2_PCR_SetAuthPolicy command.
The ESAPI function for the TPM2_PCR_SetAuthValue command.
The ESAPI function for the TPM2_PolicyAuthorize command.
The ESAPI function for the TPM2_PolicyAuthValue command.
The ESAPI function for the TPM2_PolicyCommandCode command.
The ESAPI function for the TPM2_PolicyCounterTimer command.
The ESAPI function for the TPM2_PolicyCpHash command.
The ESAPI function for the TPM2_PolicyDuplicationSelect command.
The ESAPI function for the TPM2_PolicyGetDigest command.
The ESAPI function for the TPM2_PolicyLocality command.
The ESAPI function for the TPM2_PolicyNameHash command.
The ESAPI function for the TPM2_PolicyNV command.
The ESAPI function for the TPM2_PolicyNvWritten command.
The ESAPI function for the TPM2_PolicyOR command.
The ESAPI function for the TPM2_PolicyPassword command.
The ESAPI function for the TPM2_PolicyPCR command.
The ESAPI function for the TPM2_PolicyPhysicalPresence command.
The ESAPI function for the TPM2_PolicyRestart command.
The ESAPI function for the TPM2_PolicySecret command.
The ESAPI function for the TPM2_PolicySigned command.
The ESAPI function for the TPM2_PolicyTicket command.
The ESAPI function for the TPM2_PP_Commands command.
The ESAPI function for the TPM2_Quote command.
The ESAPI function for the TPM2_ReadClock command.
The ESAPI function for the TPM2_ReadPublic command.
The ESAPI function for the TPM2_Rewrap command.
The ESAPI function for the TPM2_RSA_Decrypt command.
The ESAPI function for the TPM2_RSA_Encrypt command.
The ESAPI function for the TPM2_SelfTest command.
The ESAPI function for the TPM2_SequenceComplete command.
The ESAPI function for the TPM2_SequenceUpdate command.
The ESAPI function for the TPM2_SetAlgorithmSet command.
The ESAPI function for the TPM2_SetCommandCodeAuditStatus command.
The ESAPI function for the TPM2_SetPrimaryPolicy command.
The ESAPI function for the TPM2_Shutdown command.
The ESAPI function for the TPM2_Sign command.
The ESAPI function for the TPM2_StartAuthSession command.
The ESAPI function for the TPM2_Startup command.
The ESAPI function for the TPM2_StirRandom command.
The ESAPI function for the TPM2_TestParms command.
The ESAPI function for the TPM2_Unseal command.
The ESAPI function for the TPM2_Vendor_TCG_Test command.
The ESAPI function for the TPM2_VerifySignature command.
The ESAPI function for the TPM2_ZGen_2Phase command.

Detailed Description
The following function represent interactions with the corresponding TPM commands. 

The ESAPI function for the TPM2_ActivateCredential command.
Functions
TSS2_RC Esys_ActivateCredential_Async (ESYS_CONTEXT *esysContext, ESYS_TR activateHandle, ESYS_TR keyHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_ID_OBJECT *credentialBlob, const TPM2B_ENCRYPTED_SECRET *secret)
TSS2_RC Esys_ActivateCredential (ESYS_CONTEXT *esysContext, ESYS_TR activateHandle, ESYS_TR keyHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_ID_OBJECT *credentialBlob, const TPM2B_ENCRYPTED_SECRET *secret, TPM2B_DIGEST **certInfo)
TSS2_RC Esys_ActivateCredential_Finish (ESYS_CONTEXT *esysContext, TPM2B_DIGEST **certInfo)

Detailed Description
ESAPI function to invoke the TPM2_ActivateCredential command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_ActivateCredential (ESYS_CONTEXT *  esysContext, ESYS_TR  activateHandle, ESYS_TR  keyHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_ID_OBJECT *  credentialBlob, const TPM2B_ENCRYPTED_SECRET *  secret, TPM2B_DIGEST **  certInfo)
One-Call function for TPM2_ActivateCredential
This function invokes the TPM2_ActivateCredential command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	activateHandle 	Handle of the object associated with certificate in credentialBlob. 	
in	keyHandle 	Loaded key used to decrypt the TPMS_SENSITIVE in credentialBlob. 	
in	shandle1 	Session handle for authorization of activateHandle 	
in	shandle2 	Session handle for authorization of keyHandle 	
in	shandle3 	Third session handle. 	
in	credentialBlob 	The credential. 	
in	secret 	KeyHandle algorithm-dependent encrypted seed that protects credentialBlob. 	
out	certInfo 	The decrypted certificate information. (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_ActivateCredential_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  activateHandle, ESYS_TR  keyHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_ID_OBJECT *  credentialBlob, const TPM2B_ENCRYPTED_SECRET *  secret)
Asynchronous function for TPM2_ActivateCredential
This function invokes the TPM2_ActivateCredential 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_ActivateCredential_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	activateHandle 	Handle of the object associated with certificate in credentialBlob. 	
in	keyHandle 	Loaded key used to decrypt the TPMS_SENSITIVE in credentialBlob. 	
in	shandle1 	Session handle for authorization of activateHandle 	
in	shandle2 	Session handle for authorization of keyHandle 	
in	shandle3 	Third session handle. 	
in	credentialBlob 	The credential. 	
in	secret 	KeyHandle algorithm-dependent encrypted seed that protects credentialBlob. 	
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_ActivateCredential_Finish (ESYS_CONTEXT *  esysContext, TPM2B_DIGEST **  certInfo)
Asynchronous finish function for TPM2_ActivateCredential
This function returns the results of a TPM2_ActivateCredential command invoked via Esys_ActivateCredential_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	certInfo 	The decrypted certificate information. (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. 	

The ESAPI function for the TPM2_Certify command.
Functions
TSS2_RC Esys_Certify_Async (ESYS_CONTEXT *esysContext, ESYS_TR objectHandle, ESYS_TR signHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DATA *qualifyingData, const TPMT_SIG_SCHEME *inScheme)
TSS2_RC Esys_Certify (ESYS_CONTEXT *esysContext, ESYS_TR objectHandle, ESYS_TR signHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DATA *qualifyingData, const TPMT_SIG_SCHEME *inScheme, TPM2B_ATTEST **certifyInfo, TPMT_SIGNATURE **signature)
TSS2_RC Esys_Certify_Finish (ESYS_CONTEXT *esysContext, TPM2B_ATTEST **certifyInfo, TPMT_SIGNATURE **signature)

Detailed Description
ESAPI function to invoke the TPM2_Certify command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_Certify (ESYS_CONTEXT *  esysContext, ESYS_TR  objectHandle, ESYS_TR  signHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DATA *  qualifyingData, const TPMT_SIG_SCHEME *  inScheme, TPM2B_ATTEST **  certifyInfo, TPMT_SIGNATURE **  signature)
One-Call function for TPM2_Certify
This function invokes the TPM2_Certify command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	objectHandle 	Handle of the object to be certified. 	
in	signHandle 	Handle of the key used to sign the attestation structure. 	
in	shandle1 	Session handle for authorization of objectHandle 	
in	shandle2 	Session handle for authorization of signHandle 	
in	shandle3 	Third session handle. 	
in	qualifyingData 	User provided qualifying data. 	
in	inScheme 	TPM2_Signing scheme to use if the scheme for signHandle is TPM2_ALG_NULL. 	
out	certifyInfo 	The structure that was signed. (callee-allocated) 	
out	signature 	The asymmetric signature over certifyInfo using the key referenced by signHandle. (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_Certify_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  objectHandle, ESYS_TR  signHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DATA *  qualifyingData, const TPMT_SIG_SCHEME *  inScheme)
Asynchronous function for TPM2_Certify
This function invokes the TPM2_Certify 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_Certify_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	objectHandle 	Handle of the object to be certified. 	
in	signHandle 	Handle of the key used to sign the attestation structure. 	
in	shandle1 	Session handle for authorization of objectHandle 	
in	shandle2 	Session handle for authorization of signHandle 	
in	shandle3 	Third session handle. 	
in	qualifyingData 	User provided qualifying data. 	
in	inScheme 	TPM2_Signing scheme to use if the scheme for signHandle is TPM2_ALG_NULL. 	
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_Certify_Finish (ESYS_CONTEXT *  esysContext, TPM2B_ATTEST **  certifyInfo, TPMT_SIGNATURE **  signature)
Asynchronous finish function for TPM2_Certify
This function returns the results of a TPM2_Certify command invoked via Esys_Certify_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	certifyInfo 	The structure that was signed. (callee-allocated) 	
out	signature 	The asymmetric signature over certifyInfo using the key referenced by signHandle. (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. 	

The ESAPI function for the TPM2_CertifyCreation command.
Functions
TSS2_RC Esys_CertifyCreation_Async (ESYS_CONTEXT *esysContext, ESYS_TR signHandle, ESYS_TR objectHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DATA *qualifyingData, const TPM2B_DIGEST *creationHash, const TPMT_SIG_SCHEME *inScheme, const TPMT_TK_CREATION *creationTicket)
TSS2_RC Esys_CertifyCreation (ESYS_CONTEXT *esysContext, ESYS_TR signHandle, ESYS_TR objectHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DATA *qualifyingData, const TPM2B_DIGEST *creationHash, const TPMT_SIG_SCHEME *inScheme, const TPMT_TK_CREATION *creationTicket, TPM2B_ATTEST **certifyInfo, TPMT_SIGNATURE **signature)
TSS2_RC Esys_CertifyCreation_Finish (ESYS_CONTEXT *esysContext, TPM2B_ATTEST **certifyInfo, TPMT_SIGNATURE **signature)

Detailed Description
ESAPI function to invoke the TPM2_CertifyCreation command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_CertifyCreation (ESYS_CONTEXT *  esysContext, ESYS_TR  signHandle, ESYS_TR  objectHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DATA *  qualifyingData, const TPM2B_DIGEST *  creationHash, const TPMT_SIG_SCHEME *  inScheme, const TPMT_TK_CREATION *  creationTicket, TPM2B_ATTEST **  certifyInfo, TPMT_SIGNATURE **  signature)
One-Call function for TPM2_CertifyCreation
This function invokes the TPM2_CertifyCreation command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	signHandle 	Handle of the key that will sign the attestation block. 	
in	objectHandle 	The object associated with the creation data. 	
in	shandle1 	Session handle for authorization of signHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	qualifyingData 	User-provided qualifying data. 	
in	creationHash 	Hash of the creation data produced by TPM2_Create() or TPM2_CreatePrimary(). 	
in	inScheme 	TPM2_Signing scheme to use if the scheme for signHandle is TPM2_ALG_NULL. 	
in	creationTicket 	Ticket produced by TPM2_Create() or TPM2_CreatePrimary(). 	
out	certifyInfo 	The structure that was signed. (callee-allocated) 	
out	signature 	The signature over certifyInfo . (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_CertifyCreation_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  signHandle, ESYS_TR  objectHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DATA *  qualifyingData, const TPM2B_DIGEST *  creationHash, const TPMT_SIG_SCHEME *  inScheme, const TPMT_TK_CREATION *  creationTicket)
Asynchronous function for TPM2_CertifyCreation
This function invokes the TPM2_CertifyCreation 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_CertifyCreation_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	signHandle 	Handle of the key that will sign the attestation block. 	
in	objectHandle 	The object associated with the creation data. 	
in	shandle1 	Session handle for authorization of signHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	qualifyingData 	User-provided qualifying data. 	
in	creationHash 	Hash of the creation data produced by TPM2_Create() or TPM2_CreatePrimary(). 	
in	inScheme 	TPM2_Signing scheme to use if the scheme for signHandle is TPM2_ALG_NULL. 	
in	creationTicket 	Ticket produced by TPM2_Create() or TPM2_CreatePrimary(). 	
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_CertifyCreation_Finish (ESYS_CONTEXT *  esysContext, TPM2B_ATTEST **  certifyInfo, TPMT_SIGNATURE **  signature)
Asynchronous finish function for TPM2_CertifyCreation
This function returns the results of a TPM2_CertifyCreation command invoked via Esys_CertifyCreation_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	certifyInfo 	The structure that was signed. (callee-allocated) 	
out	signature 	The signature over certifyInfo . (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. 	

The ESAPI function for the TPM2_ChangeEPS command.
Functions
TSS2_RC Esys_ChangeEPS_Async (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_ChangeEPS (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_ChangeEPS_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_ChangeEPS command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_ChangeEPS (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
One-Call function for TPM2_ChangeEPS
This function invokes the TPM2_ChangeEPS command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	TPM2_RH_PLATFORM+{PP}. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_ChangeEPS_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
Asynchronous function for TPM2_ChangeEPS
This function invokes the TPM2_ChangeEPS 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_ChangeEPS_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	TPM2_RH_PLATFORM+{PP}. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	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. 	
TSS2_RC Esys_ChangeEPS_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_ChangeEPS
This function returns the results of a TPM2_ChangeEPS command invoked via Esys_ChangeEPS_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_ChangePPS command.
Functions
TSS2_RC Esys_ChangePPS_Async (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_ChangePPS (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_ChangePPS_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_ChangePPS command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_ChangePPS (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
One-Call function for TPM2_ChangePPS
This function invokes the TPM2_ChangePPS command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	TPM2_RH_PLATFORM+{PP}. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_ChangePPS_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
Asynchronous function for TPM2_ChangePPS
This function invokes the TPM2_ChangePPS 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_ChangePPS_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	TPM2_RH_PLATFORM+{PP}. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	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. 	
TSS2_RC Esys_ChangePPS_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_ChangePPS
This function returns the results of a TPM2_ChangePPS command invoked via Esys_ChangePPS_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_Clear command.
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:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	TPM2_RH_LOCKOUT or TPM2_RH_PLATFORM+{PP}. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	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. 	

The ESAPI function for the TPM2_ClearControl command.
Functions
TSS2_RC Esys_ClearControl_Async (ESYS_CONTEXT *esysContext, ESYS_TR auth, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPMI_YES_NO disable)
TSS2_RC Esys_ClearControl (ESYS_CONTEXT *esysContext, ESYS_TR auth, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPMI_YES_NO disable)
TSS2_RC Esys_ClearControl_Finish (ESYS_CONTEXT *esysContext)
TSS2_RC Esys_Clear (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_Clear_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_ClearControl command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_Clear (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
One-Call function for TPM2_Clear
This function invokes the TPM2_Clear command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	TPM2_RH_LOCKOUT or TPM2_RH_PLATFORM+{PP}. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_Clear_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_Clear
This function returns the results of a TPM2_Clear command invoked via Esys_Clear_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	
TSS2_RC Esys_ClearControl (ESYS_CONTEXT *  esysContext, ESYS_TR  auth, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPMI_YES_NO  disable)
One-Call function for TPM2_ClearControl
This function invokes the TPM2_ClearControl command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	auth 	TPM2_RH_LOCKOUT or TPM2_RH_PLATFORM+{PP}. 	
in	shandle1 	Session handle for authorization of auth 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	disable 	YES if the disableOwnerClear flag is to be SET, NO if the flag is to be CLEAR.. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_ClearControl_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  auth, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPMI_YES_NO  disable)
Asynchronous function for TPM2_ClearControl
This function invokes the TPM2_ClearControl 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_ClearControl_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	auth 	TPM2_RH_LOCKOUT or TPM2_RH_PLATFORM+{PP}. 	
in	shandle1 	Session handle for authorization of auth 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	disable 	YES if the disableOwnerClear flag is to be SET, NO if the flag is to be CLEAR.. 	
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. 	
TSS2_RC Esys_ClearControl_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_ClearControl
This function returns the results of a TPM2_ClearControl command invoked via Esys_ClearControl_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_ClockRateAdjust command.
Functions
TSS2_RC Esys_ClockRateAdjust_Async (ESYS_CONTEXT *esysContext, ESYS_TR auth, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPM2_CLOCK_ADJUST rateAdjust)
TSS2_RC Esys_ClockRateAdjust (ESYS_CONTEXT *esysContext, ESYS_TR auth, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPM2_CLOCK_ADJUST rateAdjust)
TSS2_RC Esys_ClockRateAdjust_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_ClockRateAdjust command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_ClockRateAdjust (ESYS_CONTEXT *  esysContext, ESYS_TR  auth, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPM2_CLOCK_ADJUST  rateAdjust)
One-Call function for TPM2_ClockRateAdjust
This function invokes the TPM2_ClockRateAdjust command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	auth 	TPM2_RH_OWNER or TPM2_RH_PLATFORM+{PP}. 	
in	shandle1 	Session handle for authorization of auth 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	rateAdjust 	Adjustment to current Clock update rate. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_ClockRateAdjust_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  auth, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPM2_CLOCK_ADJUST  rateAdjust)
Asynchronous function for TPM2_ClockRateAdjust
This function invokes the TPM2_ClockRateAdjust 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_ClockRateAdjust_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	auth 	TPM2_RH_OWNER or TPM2_RH_PLATFORM+{PP}. 	
in	shandle1 	Session handle for authorization of auth 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	rateAdjust 	Adjustment to current Clock update rate. 	
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. 	
TSS2_RC Esys_ClockRateAdjust_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_ClockRateAdjust
This function returns the results of a TPM2_ClockRateAdjust command invoked via Esys_ClockRateAdjust_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_ClockSet command.
Functions
TSS2_RC Esys_ClockSet_Async (ESYS_CONTEXT *esysContext, ESYS_TR auth, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, UINT64 newTime)
TSS2_RC Esys_ClockSet (ESYS_CONTEXT *esysContext, ESYS_TR auth, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, UINT64 newTime)
TSS2_RC Esys_ClockSet_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_ClockSet command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_ClockSet (ESYS_CONTEXT *  esysContext, ESYS_TR  auth, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, UINT64  newTime)
One-Call function for TPM2_ClockSet
This function invokes the TPM2_ClockSet command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	auth 	TPM2_RH_OWNER or TPM2_RH_PLATFORM+{PP}. 	
in	shandle1 	Session handle for authorization of auth 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	newTime 	New Clock setting in milliseconds. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_ClockSet_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  auth, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, UINT64  newTime)
Asynchronous function for TPM2_ClockSet
This function invokes the TPM2_ClockSet 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_ClockSet_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	auth 	TPM2_RH_OWNER or TPM2_RH_PLATFORM+{PP}. 	
in	shandle1 	Session handle for authorization of auth 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	newTime 	New Clock setting in milliseconds. 	
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. 	
TSS2_RC Esys_ClockSet_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_ClockSet
This function returns the results of a TPM2_ClockSet command invoked via Esys_ClockSet_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_Commit command.
Functions
TSS2_RC Esys_Commit_Async (ESYS_CONTEXT *esysContext, ESYS_TR signHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_ECC_POINT *P1, const TPM2B_SENSITIVE_DATA *s2, const TPM2B_ECC_PARAMETER *y2)
TSS2_RC Esys_Commit (ESYS_CONTEXT *esysContext, ESYS_TR signHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_ECC_POINT *P1, const TPM2B_SENSITIVE_DATA *s2, const TPM2B_ECC_PARAMETER *y2, TPM2B_ECC_POINT **K, TPM2B_ECC_POINT **L, TPM2B_ECC_POINT **E, UINT16 *counter)
TSS2_RC Esys_Commit_Finish (ESYS_CONTEXT *esysContext, TPM2B_ECC_POINT **K, TPM2B_ECC_POINT **L, TPM2B_ECC_POINT **E, UINT16 *counter)

Detailed Description
ESAPI function to invoke the TPM2_Commit command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_Commit (ESYS_CONTEXT *  esysContext, ESYS_TR  signHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_ECC_POINT *  P1, const TPM2B_SENSITIVE_DATA *  s2, const TPM2B_ECC_PARAMETER *  y2, TPM2B_ECC_POINT **  K, TPM2B_ECC_POINT **  L, TPM2B_ECC_POINT **  E, UINT16 *  counter)
One-Call function for TPM2_Commit
This function invokes the TPM2_Commit command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	signHandle 	Handle of the key that will be used in the signing operation. 	
in	shandle1 	Session handle for authorization of signHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	P1 	A point (M) on the curve used by signHandle . 	
in	s2 	Octet array used to derive x-coordinate of a base point. 	
in	y2 	Y coordinate of the point associated with s2. 	
out	K 	ECC point K := [ds](x2, y2). (callee-allocated) 	
out	L 	ECC point L := [r](x2, y2). (callee-allocated) 	
out	E 	ECC point E := [r]P1. (callee-allocated) 	
out	counter 	Least-significant 16 bits of commitCount. (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_Commit_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  signHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_ECC_POINT *  P1, const TPM2B_SENSITIVE_DATA *  s2, const TPM2B_ECC_PARAMETER *  y2)
Asynchronous function for TPM2_Commit
This function invokes the TPM2_Commit 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_Commit_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	signHandle 	Handle of the key that will be used in the signing operation. 	
in	shandle1 	Session handle for authorization of signHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	P1 	A point (M) on the curve used by signHandle . 	
in	s2 	Octet array used to derive x-coordinate of a base point. 	
in	y2 	Y coordinate of the point associated with s2. 	
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_Commit_Finish (ESYS_CONTEXT *  esysContext, TPM2B_ECC_POINT **  K, TPM2B_ECC_POINT **  L, TPM2B_ECC_POINT **  E, UINT16 *  counter)
Asynchronous finish function for TPM2_Commit
This function returns the results of a TPM2_Commit command invoked via Esys_Commit_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	K 	ECC point K := [ds](x2, y2). (callee-allocated) 	
out	L 	ECC point L := [r](x2, y2). (callee-allocated) 	
out	E 	ECC point E := [r]P1. (callee-allocated) 	
out	counter 	Least-significant 16 bits of commitCount. (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. 	

The ESAPI function for the TPM2_ContextLoad command.
Functions
TSS2_RC Esys_ContextLoad_Async (ESYS_CONTEXT *esysContext, const TPMS_CONTEXT *context)
TSS2_RC Esys_ContextLoad (ESYS_CONTEXT *esysContext, const TPMS_CONTEXT *context, ESYS_TR *loadedHandle)
TSS2_RC Esys_ContextLoad_Finish (ESYS_CONTEXT *esysContext, ESYS_TR *loadedHandle)

Detailed Description
ESAPI function to invoke the TPM2_ContextLoad command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_ContextLoad (ESYS_CONTEXT *  esysContext, const TPMS_CONTEXT *  context, ESYS_TR *  loadedHandle)
One-Call function for TPM2_ContextLoad
This function invokes the TPM2_ContextLoad command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	context 	The context blob. 	
out	loadedHandle 	ESYS_TR handle of ESYS resource for TPMI_DH_CONTEXT. 	
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_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_ContextLoad_Async (ESYS_CONTEXT *  esysContext, const TPMS_CONTEXT *  context)
Asynchronous function for TPM2_ContextLoad
This function invokes the TPM2_ContextLoad 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_ContextLoad_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	context 	The context blob. 	
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_RC Esys_ContextLoad_Finish (ESYS_CONTEXT *  esysContext, ESYS_TR *  loadedHandle)
Asynchronous finish function for TPM2_ContextLoad
This function returns the results of a TPM2_ContextLoad command invoked via Esys_ContextLoad_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	loadedHandle 	ESYS_TR handle of ESYS resource for TPMI_DH_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_ContextSave command.
Functions
TSS2_RC Esys_ContextSave_Async (ESYS_CONTEXT *esysContext, ESYS_TR saveHandle)
TSS2_RC Esys_ContextSave (ESYS_CONTEXT *esysContext, ESYS_TR saveHandle, TPMS_CONTEXT **context)
TSS2_RC Esys_ContextSave_Finish (ESYS_CONTEXT *esysContext, TPMS_CONTEXT **context)

Detailed Description
ESAPI function to invoke the TPM2_ContextSave command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_ContextSave (ESYS_CONTEXT *  esysContext, ESYS_TR  saveHandle, TPMS_CONTEXT **  context)
One-Call function for TPM2_ContextSave
This function invokes the TPM2_ContextSave command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	saveHandle 	Handle of the resource to save. 	
out	context 	. (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_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_ContextSave_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  saveHandle)
Asynchronous function for TPM2_ContextSave
This function invokes the TPM2_ContextSave 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_ContextSave_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	saveHandle 	Handle of the resource to save. 	
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_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_ContextSave_Finish (ESYS_CONTEXT *  esysContext, TPMS_CONTEXT **  context)
Asynchronous finish function for TPM2_ContextSave
This function returns the results of a TPM2_ContextSave command invoked via Esys_ContextSave_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	context 	. (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. 	

The ESAPI function for the TPM2_Create command.
Functions
TSS2_RC Esys_Create_Async (ESYS_CONTEXT *esysContext, ESYS_TR parentHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_SENSITIVE_CREATE *inSensitive, const TPM2B_PUBLIC *inPublic, const TPM2B_DATA *outsideInfo, const TPML_PCR_SELECTION *creationPCR)
TSS2_RC Esys_Create (ESYS_CONTEXT *esysContext, ESYS_TR parentHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_SENSITIVE_CREATE *inSensitive, const TPM2B_PUBLIC *inPublic, const TPM2B_DATA *outsideInfo, const TPML_PCR_SELECTION *creationPCR, TPM2B_PRIVATE **outPrivate, TPM2B_PUBLIC **outPublic, TPM2B_CREATION_DATA **creationData, TPM2B_DIGEST **creationHash, TPMT_TK_CREATION **creationTicket)
TSS2_RC Esys_Create_Finish (ESYS_CONTEXT *esysContext, TPM2B_PRIVATE **outPrivate, TPM2B_PUBLIC **outPublic, TPM2B_CREATION_DATA **creationData, TPM2B_DIGEST **creationHash, TPMT_TK_CREATION **creationTicket)

Detailed Description
ESAPI function to invoke the TPM2_Create command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_Create (ESYS_CONTEXT *  esysContext, ESYS_TR  parentHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_SENSITIVE_CREATE *  inSensitive, const TPM2B_PUBLIC *  inPublic, const TPM2B_DATA *  outsideInfo, const TPML_PCR_SELECTION *  creationPCR, TPM2B_PRIVATE **  outPrivate, TPM2B_PUBLIC **  outPublic, TPM2B_CREATION_DATA **  creationData, TPM2B_DIGEST **  creationHash, TPMT_TK_CREATION **  creationTicket)
One-Call function for TPM2_Create
This function invokes the TPM2_Create command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	parentHandle 	Handle of parent for new object. 	
in	shandle1 	Session handle for authorization of parentHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	inSensitive 	The sensitive data. 	
in	inPublic 	The public template. 	
in	outsideInfo 	Data that will be included in the creation data for this object to provide permanent, verifiable linkage between this object and some object owner data. 	
in	creationPCR 	PCR that will be used in creation data. 	
out	outPrivate 	The private portion of the object. (callee-allocated) 	
out	outPublic 	The public portion of the created object. (callee-allocated) 	
out	creationData 	Contains a TPMS_CREATION_DATA. (callee-allocated) 	
out	creationHash 	Digest of creationData using nameAlg of outPublic. (callee-allocated) 	
out	creationTicket 	Ticket used by TPM2_CertifyCreation() to validate that the creation data was produced by the TPM. (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_Create_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  parentHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_SENSITIVE_CREATE *  inSensitive, const TPM2B_PUBLIC *  inPublic, const TPM2B_DATA *  outsideInfo, const TPML_PCR_SELECTION *  creationPCR)
Asynchronous function for TPM2_Create
This function invokes the TPM2_Create 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_Create_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	parentHandle 	Handle of parent for new object. 	
in	shandle1 	Session handle for authorization of parentHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	inSensitive 	The sensitive data. 	
in	inPublic 	The public template. 	
in	outsideInfo 	Data that will be included in the creation data for this object to provide permanent, verifiable linkage between this object and some object owner data. 	
in	creationPCR 	PCR that will be used in creation data. 	
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_Create_Finish (ESYS_CONTEXT *  esysContext, TPM2B_PRIVATE **  outPrivate, TPM2B_PUBLIC **  outPublic, TPM2B_CREATION_DATA **  creationData, TPM2B_DIGEST **  creationHash, TPMT_TK_CREATION **  creationTicket)
Asynchronous finish function for TPM2_Create
This function returns the results of a TPM2_Create command invoked via Esys_Create_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	outPrivate 	The private portion of the object. (callee-allocated) 	
out	outPublic 	The public portion of the created object. (callee-allocated) 	
out	creationData 	Contains a TPMS_CREATION_DATA. (callee-allocated) 	
out	creationHash 	Digest of creationData using nameAlg of outPublic. (callee-allocated) 	
out	creationTicket 	Ticket used by TPM2_CertifyCreation() to validate that the creation data was produced by the TPM. (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. 	

The ESAPI function for the TPM2_CreatePrimary command.
Functions
TSS2_RC Esys_CreatePrimary_Async (ESYS_CONTEXT *esysContext, ESYS_TR primaryHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_SENSITIVE_CREATE *inSensitive, const TPM2B_PUBLIC *inPublic, const TPM2B_DATA *outsideInfo, const TPML_PCR_SELECTION *creationPCR)
TSS2_RC Esys_CreatePrimary (ESYS_CONTEXT *esysContext, ESYS_TR primaryHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_SENSITIVE_CREATE *inSensitive, const TPM2B_PUBLIC *inPublic, const TPM2B_DATA *outsideInfo, const TPML_PCR_SELECTION *creationPCR, ESYS_TR *objectHandle, TPM2B_PUBLIC **outPublic, TPM2B_CREATION_DATA **creationData, TPM2B_DIGEST **creationHash, TPMT_TK_CREATION **creationTicket)
TSS2_RC Esys_CreatePrimary_Finish (ESYS_CONTEXT *esysContext, ESYS_TR *objectHandle, TPM2B_PUBLIC **outPublic, TPM2B_CREATION_DATA **creationData, TPM2B_DIGEST **creationHash, TPMT_TK_CREATION **creationTicket)

Detailed Description
ESAPI function to invoke the TPM2_CreatePrimary command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_CreatePrimary (ESYS_CONTEXT *  esysContext, ESYS_TR  primaryHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_SENSITIVE_CREATE *  inSensitive, const TPM2B_PUBLIC *  inPublic, const TPM2B_DATA *  outsideInfo, const TPML_PCR_SELECTION *  creationPCR, ESYS_TR *  objectHandle, TPM2B_PUBLIC **  outPublic, TPM2B_CREATION_DATA **  creationData, TPM2B_DIGEST **  creationHash, TPMT_TK_CREATION **  creationTicket)
One-Call function for TPM2_CreatePrimary
This function invokes the TPM2_CreatePrimary command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	primaryHandle 	TPM2_RH_ENDORSEMENT, TPM2_RH_OWNER, TPM2_RH_PLATFORM+{PP}, or TPM2_RH_NULL. 	
in	shandle1 	Session handle for authorization of primaryHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	inSensitive 	The sensitive data, see TPM 2.0 Part 1 Sensitive Values. 	
in	inPublic 	The public template. 	
in	outsideInfo 	Data that will be included in the creation data for this object to provide permanent, verifiable linkage between this object and some object owner data. 	
in	creationPCR 	PCR that will be used in creation data. 	
out	outPublic 	The public portion of the created object. (callee-allocated) 	
out	creationData 	Contains a TPMT_CREATION_DATA. (callee-allocated) 	
out	creationHash 	Digest of creationData using nameAlg of outPublic. (callee-allocated) 	
out	creationTicket 	Ticket used by TPM2_CertifyCreation() to validate that the creation data was produced by the TPM. (callee-allocated) 	
out	objectHandle 	ESYS_TR handle of ESYS resource for TPM2_HANDLE. 	
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_CreatePrimary_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  primaryHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_SENSITIVE_CREATE *  inSensitive, const TPM2B_PUBLIC *  inPublic, const TPM2B_DATA *  outsideInfo, const TPML_PCR_SELECTION *  creationPCR)
Asynchronous function for TPM2_CreatePrimary
This function invokes the TPM2_CreatePrimary 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_CreatePrimary_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	primaryHandle 	TPM2_RH_ENDORSEMENT, TPM2_RH_OWNER, TPM2_RH_PLATFORM+{PP}, or TPM2_RH_NULL. 	
in	shandle1 	Session handle for authorization of primaryHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	inSensitive 	The sensitive data, see TPM 2.0 Part 1 Sensitive Values. 	
in	inPublic 	The public template. 	
in	outsideInfo 	Data that will be included in the creation data for this object to provide permanent, verifiable linkage between this object and some object owner data. 	
in	creationPCR 	PCR that will be used in creation data. 	
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_CreatePrimary_Finish (ESYS_CONTEXT *  esysContext, ESYS_TR *  objectHandle, TPM2B_PUBLIC **  outPublic, TPM2B_CREATION_DATA **  creationData, TPM2B_DIGEST **  creationHash, TPMT_TK_CREATION **  creationTicket)
Asynchronous finish function for TPM2_CreatePrimary
This function returns the results of a TPM2_CreatePrimary command invoked via Esys_CreatePrimary_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	outPublic 	The public portion of the created object. (callee-allocated) 	
out	creationData 	Contains a TPMT_CREATION_DATA. (callee-allocated) 	
out	creationHash 	Digest of creationData using nameAlg of outPublic. (callee-allocated) 	
out	creationTicket 	Ticket used by TPM2_CertifyCreation() to validate that the creation data was produced by the TPM. (callee-allocated) 	
out	objectHandle 	ESYS_TR handle of ESYS resource for TPM2_HANDLE. 	
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. 	

The ESAPI function for the TPM2_DictionaryAttackLockReset command.
Functions
TSS2_RC Esys_DictionaryAttackLockReset_Async (ESYS_CONTEXT *esysContext, ESYS_TR lockHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_DictionaryAttackLockReset (ESYS_CONTEXT *esysContext, ESYS_TR lockHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_DictionaryAttackLockReset_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_DictionaryAttackLockReset command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_DictionaryAttackLockReset (ESYS_CONTEXT *  esysContext, ESYS_TR  lockHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
One-Call function for TPM2_DictionaryAttackLockReset
This function invokes the TPM2_DictionaryAttackLockReset command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	lockHandle 	TPM2_RH_LOCKOUT. 	
in	shandle1 	Session handle for authorization of lockHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_DictionaryAttackLockReset_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  lockHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
Asynchronous function for TPM2_DictionaryAttackLockReset
This function invokes the TPM2_DictionaryAttackLockReset 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_DictionaryAttackLockReset_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	lockHandle 	TPM2_RH_LOCKOUT. 	
in	shandle1 	Session handle for authorization of lockHandle 	
in	shandle2 	Second session handle. 	
in	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. 	
TSS2_RC Esys_DictionaryAttackLockReset_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_DictionaryAttackLockReset
This function returns the results of a TPM2_DictionaryAttackLockReset command invoked via Esys_DictionaryAttackLockReset_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_DictionaryAttackParameters command.
Functions
TSS2_RC Esys_DictionaryAttackParameters_Async (ESYS_CONTEXT *esysContext, ESYS_TR lockHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, UINT32 newMaxTries, UINT32 newRecoveryTime, UINT32 lockoutRecovery)
TSS2_RC Esys_DictionaryAttackParameters (ESYS_CONTEXT *esysContext, ESYS_TR lockHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, UINT32 newMaxTries, UINT32 newRecoveryTime, UINT32 lockoutRecovery)
TSS2_RC Esys_DictionaryAttackParameters_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_DictionaryAttackParameters command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_DictionaryAttackParameters (ESYS_CONTEXT *  esysContext, ESYS_TR  lockHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, UINT32  newMaxTries, UINT32  newRecoveryTime, UINT32  lockoutRecovery)
One-Call function for TPM2_DictionaryAttackParameters
This function invokes the TPM2_DictionaryAttackParameters command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	lockHandle 	TPM2_RH_LOCKOUT. 	
in	shandle1 	Session handle for authorization of lockHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	newMaxTries 	Count of authorization failures before the lockout is imposed. 	
in	newRecoveryTime 	Time in seconds before the authorization failure count is automatically decremented. 	
in	lockoutRecovery 	Time in seconds after a lockoutAuth failure before use of lockoutAuth is allowed. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_DictionaryAttackParameters_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  lockHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, UINT32  newMaxTries, UINT32  newRecoveryTime, UINT32  lockoutRecovery)
Asynchronous function for TPM2_DictionaryAttackParameters
This function invokes the TPM2_DictionaryAttackParameters 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_DictionaryAttackParameters_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	lockHandle 	TPM2_RH_LOCKOUT. 	
in	shandle1 	Session handle for authorization of lockHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	newMaxTries 	Count of authorization failures before the lockout is imposed. 	
in	newRecoveryTime 	Time in seconds before the authorization failure count is automatically decremented. 	
in	lockoutRecovery 	Time in seconds after a lockoutAuth failure before use of lockoutAuth is allowed. 	
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. 	
TSS2_RC Esys_DictionaryAttackParameters_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_DictionaryAttackParameters
This function returns the results of a TPM2_DictionaryAttackParameters command invoked via Esys_DictionaryAttackParameters_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_Duplicate command.
Functions
TSS2_RC Esys_Duplicate_Async (ESYS_CONTEXT *esysContext, ESYS_TR objectHandle, ESYS_TR newParentHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DATA *encryptionKeyIn, const TPMT_SYM_DEF_OBJECT *symmetricAlg)
TSS2_RC Esys_Duplicate (ESYS_CONTEXT *esysContext, ESYS_TR objectHandle, ESYS_TR newParentHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DATA *encryptionKeyIn, const TPMT_SYM_DEF_OBJECT *symmetricAlg, TPM2B_DATA **encryptionKeyOut, TPM2B_PRIVATE **duplicate, TPM2B_ENCRYPTED_SECRET **outSymSeed)
TSS2_RC Esys_Duplicate_Finish (ESYS_CONTEXT *esysContext, TPM2B_DATA **encryptionKeyOut, TPM2B_PRIVATE **duplicate, TPM2B_ENCRYPTED_SECRET **outSymSeed)

Detailed Description
ESAPI function to invoke the TPM2_Duplicate command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_Duplicate (ESYS_CONTEXT *  esysContext, ESYS_TR  objectHandle, ESYS_TR  newParentHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DATA *  encryptionKeyIn, const TPMT_SYM_DEF_OBJECT *  symmetricAlg, TPM2B_DATA **  encryptionKeyOut, TPM2B_PRIVATE **  duplicate, TPM2B_ENCRYPTED_SECRET **  outSymSeed)
One-Call function for TPM2_Duplicate
This function invokes the TPM2_Duplicate command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	objectHandle 	Loaded object to duplicate. 	
in	newParentHandle 	Shall reference the public area of an asymmetric key. 	
in	shandle1 	Session handle for authorization of objectHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	encryptionKeyIn 	Optional symmetric encryption key. 	
in	symmetricAlg 	Definition for the symmetric algorithm to be used for the inner wrapper. 	
out	encryptionKeyOut 	TPM2_If the caller provided an encryption key or if symmetricAlg was TPM2_ALG_NULL, then this will be the TPM2_Empty TPM2_Buffer; otherwise, it shall contain the TPM2_TPM-generated, symmetric encryption key for the inner wrapper.. (callee-allocated) 	
out	duplicate 	Private area that may be encrypted by encryptionKeyIn; and may be doubly encrypted. (callee-allocated) 	
out	outSymSeed 	Seed protected by the asymmetric algorithms of new parent (NP). (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_Duplicate_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  objectHandle, ESYS_TR  newParentHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DATA *  encryptionKeyIn, const TPMT_SYM_DEF_OBJECT *  symmetricAlg)
Asynchronous function for TPM2_Duplicate
This function invokes the TPM2_Duplicate 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_Duplicate_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	objectHandle 	Loaded object to duplicate. 	
in	newParentHandle 	Shall reference the public area of an asymmetric key. 	
in	shandle1 	Session handle for authorization of objectHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	encryptionKeyIn 	Optional symmetric encryption key. 	
in	symmetricAlg 	Definition for the symmetric algorithm to be used 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_Duplicate_Finish (ESYS_CONTEXT *  esysContext, TPM2B_DATA **  encryptionKeyOut, TPM2B_PRIVATE **  duplicate, TPM2B_ENCRYPTED_SECRET **  outSymSeed)
Asynchronous finish function for TPM2_Duplicate
This function returns the results of a TPM2_Duplicate command invoked via Esys_Duplicate_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	encryptionKeyOut 	TPM2_If the caller provided an encryption key or if symmetricAlg was TPM2_ALG_NULL, then this will be the TPM2_Empty TPM2_Buffer; otherwise, it shall contain the TPM2_TPM-generated, symmetric encryption key for the inner wrapper.. (callee-allocated) 	
out	duplicate 	Private area that may be encrypted by encryptionKeyIn; and may be doubly encrypted. (callee-allocated) 	
out	outSymSeed 	Seed protected by the asymmetric algorithms of new parent (NP). (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. 	

The ESAPI function for the TPM2_ECC_Parameters command.
Functions
TSS2_RC Esys_ECC_Parameters_Async (ESYS_CONTEXT *esysContext, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPMI_ECC_CURVE curveID)
TSS2_RC Esys_ECC_Parameters (ESYS_CONTEXT *esysContext, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPMI_ECC_CURVE curveID, TPMS_ALGORITHM_DETAIL_ECC **parameters)
TSS2_RC Esys_ECC_Parameters_Finish (ESYS_CONTEXT *esysContext, TPMS_ALGORITHM_DETAIL_ECC **parameters)

Detailed Description
ESAPI function to invoke the TPM2_ECC_Parameters command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_ECC_Parameters (ESYS_CONTEXT *  esysContext, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPMI_ECC_CURVE  curveID, TPMS_ALGORITHM_DETAIL_ECC **  parameters)
One-Call function for TPM2_ECC_Parameters
This function invokes the TPM2_ECC_Parameters command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	curveID 	Parameter set selector. 	
out	parameters 	ECC parameters for the selected curve. (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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_ECC_Parameters_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPMI_ECC_CURVE  curveID)
Asynchronous function for TPM2_ECC_Parameters
This function invokes the TPM2_ECC_Parameters 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_ECC_Parameters_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	curveID 	Parameter set selector. 	
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_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. 	
TSS2_RC Esys_ECC_Parameters_Finish (ESYS_CONTEXT *  esysContext, TPMS_ALGORITHM_DETAIL_ECC **  parameters)
Asynchronous finish function for TPM2_ECC_Parameters
This function returns the results of a TPM2_ECC_Parameters command invoked via Esys_ECC_Parameters_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	parameters 	ECC parameters for the selected curve. (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. 	

The ESAPI function for the TPM2_ECDH_KeyGen command.
Functions
TSS2_RC Esys_ECDH_KeyGen_Async (ESYS_CONTEXT *esysContext, ESYS_TR keyHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_ECDH_KeyGen (ESYS_CONTEXT *esysContext, ESYS_TR keyHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPM2B_ECC_POINT **zPoint, TPM2B_ECC_POINT **pubPoint)
TSS2_RC Esys_ECDH_KeyGen_Finish (ESYS_CONTEXT *esysContext, TPM2B_ECC_POINT **zPoint, TPM2B_ECC_POINT **pubPoint)

Detailed Description
ESAPI function to invoke the TPM2_ECDH_KeyGen command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_ECDH_KeyGen (ESYS_CONTEXT *  esysContext, ESYS_TR  keyHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPM2B_ECC_POINT **  zPoint, TPM2B_ECC_POINT **  pubPoint)
One-Call function for TPM2_ECDH_KeyGen
This function invokes the TPM2_ECDH_KeyGen command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	keyHandle 	Handle of a loaded ECC key public area.. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
out	zPoint 	Results of P := h[de]Qs. (callee-allocated) 	
out	pubPoint 	Generated ephemeral public point (Qe). (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_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_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_ECDH_KeyGen_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  keyHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
Asynchronous function for TPM2_ECDH_KeyGen
This function invokes the TPM2_ECDH_KeyGen 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_ECDH_KeyGen_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	keyHandle 	Handle of a loaded ECC key public area.. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	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_RC Esys_ECDH_KeyGen_Finish (ESYS_CONTEXT *  esysContext, TPM2B_ECC_POINT **  zPoint, TPM2B_ECC_POINT **  pubPoint)
Asynchronous finish function for TPM2_ECDH_KeyGen
This function returns the results of a TPM2_ECDH_KeyGen command invoked via Esys_ECDH_KeyGen_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	zPoint 	Results of P := h[de]Qs. (callee-allocated) 	
out	pubPoint 	Generated ephemeral public point (Qe). (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. 	

The ESAPI function for the TPM2_ECDH_ZGen command.
Functions
TSS2_RC Esys_ECDH_ZGen_Async (ESYS_CONTEXT *esysContext, ESYS_TR keyHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_ECC_POINT *inPoint)
TSS2_RC Esys_ECDH_ZGen (ESYS_CONTEXT *esysContext, ESYS_TR keyHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_ECC_POINT *inPoint, TPM2B_ECC_POINT **outPoint)
TSS2_RC Esys_ECDH_ZGen_Finish (ESYS_CONTEXT *esysContext, TPM2B_ECC_POINT **outPoint)

Detailed Description
ESAPI function to invoke the TPM2_ECDH_ZGen command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_ECDH_ZGen (ESYS_CONTEXT *  esysContext, ESYS_TR  keyHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_ECC_POINT *  inPoint, TPM2B_ECC_POINT **  outPoint)
One-Call function for TPM2_ECDH_ZGen
This function invokes the TPM2_ECDH_ZGen command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	keyHandle 	Handle of a loaded ECC key. 	
in	shandle1 	Session handle for authorization of keyHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	inPoint 	A public key. 	
out	outPoint 	X and Y coordinates of the product of the multiplication Z = (xZ , yZ) := [hdS]QB. (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_ECDH_ZGen_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  keyHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_ECC_POINT *  inPoint)
Asynchronous function for TPM2_ECDH_ZGen
This function invokes the TPM2_ECDH_ZGen 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_ECDH_ZGen_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	keyHandle 	Handle of a loaded ECC key. 	
in	shandle1 	Session handle for authorization of keyHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	inPoint 	A public key. 	
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_ECDH_ZGen_Finish (ESYS_CONTEXT *  esysContext, TPM2B_ECC_POINT **  outPoint)
Asynchronous finish function for TPM2_ECDH_ZGen
This function returns the results of a TPM2_ECDH_ZGen command invoked via Esys_ECDH_ZGen_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	outPoint 	X and Y coordinates of the product of the multiplication Z = (xZ , yZ) := [hdS]QB. (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. 	

The ESAPI function for the TPM2_EC_Ephemeral command.
Functions
TSS2_RC Esys_EC_Ephemeral_Async (ESYS_CONTEXT *esysContext, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPMI_ECC_CURVE curveID)
TSS2_RC Esys_EC_Ephemeral (ESYS_CONTEXT *esysContext, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPMI_ECC_CURVE curveID, TPM2B_ECC_POINT **Q, UINT16 *counter)
TSS2_RC Esys_EC_Ephemeral_Finish (ESYS_CONTEXT *esysContext, TPM2B_ECC_POINT **Q, UINT16 *counter)

Detailed Description
ESAPI function to invoke the TPM2_EC_Ephemeral command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_EC_Ephemeral (ESYS_CONTEXT *  esysContext, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPMI_ECC_CURVE  curveID, TPM2B_ECC_POINT **  Q, UINT16 *  counter)
One-Call function for TPM2_EC_Ephemeral
This function invokes the TPM2_EC_Ephemeral command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	curveID 	The curve for the computed ephemeral point . 	
out	Q 	Ephemeral public key Q := [r]G. (callee-allocated) 	
out	counter 	Least-significant 16 bits of commitCount. (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_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_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_EC_Ephemeral_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPMI_ECC_CURVE  curveID)
Asynchronous function for TPM2_EC_Ephemeral
This function invokes the TPM2_EC_Ephemeral 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_EC_Ephemeral_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	curveID 	The curve for the computed ephemeral point . 	
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_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_RC Esys_EC_Ephemeral_Finish (ESYS_CONTEXT *  esysContext, TPM2B_ECC_POINT **  Q, UINT16 *  counter)
Asynchronous finish function for TPM2_EC_Ephemeral
This function returns the results of a TPM2_EC_Ephemeral command invoked via Esys_EC_Ephemeral_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	Q 	Ephemeral public key Q := [r]G. (callee-allocated) 	
out	counter 	Least-significant 16 bits of commitCount. (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. 	

The ESAPI function for the TPM2_EncryptDecrypt command.
Functions
TSS2_RC Esys_EncryptDecrypt_Async (ESYS_CONTEXT *esysContext, ESYS_TR keyHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPMI_YES_NO decrypt, TPMI_ALG_CIPHER_MODE mode, const TPM2B_IV *ivIn, const TPM2B_MAX_BUFFER *inData)
TSS2_RC Esys_EncryptDecrypt (ESYS_CONTEXT *esysContext, ESYS_TR keyHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPMI_YES_NO decrypt, TPMI_ALG_CIPHER_MODE mode, const TPM2B_IV *ivIn, const TPM2B_MAX_BUFFER *inData, TPM2B_MAX_BUFFER **outData, TPM2B_IV **ivOut)
TSS2_RC Esys_EncryptDecrypt_Finish (ESYS_CONTEXT *esysContext, TPM2B_MAX_BUFFER **outData, TPM2B_IV **ivOut)

Detailed Description
ESAPI function to invoke the TPM2_EncryptDecrypt command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_EncryptDecrypt (ESYS_CONTEXT *  esysContext, ESYS_TR  keyHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPMI_YES_NO  decrypt, TPMI_ALG_CIPHER_MODE  mode, const TPM2B_IV *  ivIn, const TPM2B_MAX_BUFFER *  inData, TPM2B_MAX_BUFFER **  outData, TPM2B_IV **  ivOut)
One-Call function for TPM2_EncryptDecrypt
This function invokes the TPM2_EncryptDecrypt command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	keyHandle 	The symmetric key used for the operation. 	
in	shandle1 	Session handle for authorization of keyHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	decrypt 	If YES, then the operation is decryption; if NO, the operation is encryption. 	
in	mode 	Symmetric mode. 	
in	ivIn 	An initial value as required by the algorithm. 	
in	inData 	The data to be encrypted/decrypted. 	
out	outData 	Encrypted or decrypted output. (callee-allocated) 	
out	ivOut 	Chaining value to use for IV in next round. (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_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_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_EncryptDecrypt_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  keyHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPMI_YES_NO  decrypt, TPMI_ALG_CIPHER_MODE  mode, const TPM2B_IV *  ivIn, const TPM2B_MAX_BUFFER *  inData)
Asynchronous function for TPM2_EncryptDecrypt
This function invokes the TPM2_EncryptDecrypt 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_EncryptDecrypt_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	keyHandle 	The symmetric key used for the operation. 	
in	shandle1 	Session handle for authorization of keyHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	decrypt 	If YES, then the operation is decryption; if NO, the operation is encryption. 	
in	mode 	Symmetric mode. 	
in	ivIn 	An initial value as required by the algorithm. 	
in	inData 	The data to be encrypted/decrypted. 	
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_RC Esys_EncryptDecrypt_Finish (ESYS_CONTEXT *  esysContext, TPM2B_MAX_BUFFER **  outData, TPM2B_IV **  ivOut)
Asynchronous finish function for TPM2_EncryptDecrypt
This function returns the results of a TPM2_EncryptDecrypt command invoked via Esys_EncryptDecrypt_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	outData 	Encrypted or decrypted output. (callee-allocated) 	
out	ivOut 	Chaining value to use for IV in next round. (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. 	

The ESAPI function for the TPM2_EventSequenceComplete command.
Functions
TSS2_RC Esys_EventSequenceComplete_Async (ESYS_CONTEXT *esysContext, ESYS_TR pcrHandle, ESYS_TR sequenceHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_MAX_BUFFER *buffer)
TSS2_RC Esys_EventSequenceComplete (ESYS_CONTEXT *esysContext, ESYS_TR pcrHandle, ESYS_TR sequenceHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_MAX_BUFFER *buffer, TPML_DIGEST_VALUES **results)
TSS2_RC Esys_EventSequenceComplete_Finish (ESYS_CONTEXT *esysContext, TPML_DIGEST_VALUES **results)

Detailed Description
ESAPI function to invoke the TPM2_EventSequenceComplete command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_EventSequenceComplete (ESYS_CONTEXT *  esysContext, ESYS_TR  pcrHandle, ESYS_TR  sequenceHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_MAX_BUFFER *  buffer, TPML_DIGEST_VALUES **  results)
One-Call function for TPM2_EventSequenceComplete
This function invokes the TPM2_EventSequenceComplete command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	pcrHandle 	PCR to be extended with the Event data. 	
in	sequenceHandle 	Authorization for the sequence. 	
in	shandle1 	Session handle for authorization of pcrHandle 	
in	shandle2 	Session handle for authorization of sequenceHandle 	
in	shandle3 	Third session handle. 	
in	buffer 	Data to be added to the Event. 	
out	results 	List of digests computed for the PCR. (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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_EventSequenceComplete_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  pcrHandle, ESYS_TR  sequenceHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_MAX_BUFFER *  buffer)
Asynchronous function for TPM2_EventSequenceComplete
This function invokes the TPM2_EventSequenceComplete 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_EventSequenceComplete_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	pcrHandle 	PCR to be extended with the Event data. 	
in	sequenceHandle 	Authorization for the sequence. 	
in	shandle1 	Session handle for authorization of pcrHandle 	
in	shandle2 	Session handle for authorization of sequenceHandle 	
in	shandle3 	Third session handle. 	
in	buffer 	Data to be added to the Event. 	
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_ENCRYPT_PARAM 	if one of the sessions has the 'encrypt' attribute set and the command does not support encryption of the first response parameter. 	
TSS2_RC Esys_EventSequenceComplete_Finish (ESYS_CONTEXT *  esysContext, TPML_DIGEST_VALUES **  results)
Asynchronous finish function for TPM2_EventSequenceComplete
This function returns the results of a TPM2_EventSequenceComplete command invoked via Esys_EventSequenceComplete_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	results 	List of digests computed for the PCR. (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. 	

The ESAPI function for the TPM2_EvictControl command.
Functions
TSS2_RC Esys_EvictControl_Async (ESYS_CONTEXT *esysContext, ESYS_TR auth, ESYS_TR objectHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPMI_DH_PERSISTENT persistentHandle)
TSS2_RC Esys_EvictControl (ESYS_CONTEXT *esysContext, ESYS_TR auth, ESYS_TR objectHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPMI_DH_PERSISTENT persistentHandle, ESYS_TR *newObjectHandle)
TSS2_RC Esys_EvictControl_Finish (ESYS_CONTEXT *esysContext, ESYS_TR *newObjectHandle)

Detailed Description
ESAPI function to invoke the TPM2_EvictControl command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_EvictControl (ESYS_CONTEXT *  esysContext, ESYS_TR  auth, ESYS_TR  objectHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPMI_DH_PERSISTENT  persistentHandle, ESYS_TR *  newObjectHandle)
One-Call function for TPM2_EvictControl
This function invokes the TPM2_EvictControl command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	auth 	TPM2_RH_OWNER or TPM2_RH_PLATFORM+{PP}. 	
in	objectHandle 	The handle of a loaded object. 	
in	shandle1 	Session handle for authorization of auth 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	persistentHandle 	If objectHandle is a transient object handle, then this is the persistent handle for the object. 	
out	newObjectHandle 	ESYS_TR handle of ESYS resource for TPM2_HANDLE. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_EvictControl_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  auth, ESYS_TR  objectHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPMI_DH_PERSISTENT  persistentHandle)
Asynchronous function for TPM2_EvictControl
This function invokes the TPM2_EvictControl 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_EvictControl_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	auth 	TPM2_RH_OWNER or TPM2_RH_PLATFORM+{PP}. 	
in	objectHandle 	The handle of a loaded object. 	
in	shandle1 	Session handle for authorization of auth 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	persistentHandle 	If objectHandle is a transient object handle, then this is the persistent handle for the object. 	
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. 	
TSS2_RC Esys_EvictControl_Finish (ESYS_CONTEXT *  esysContext, ESYS_TR *  newObjectHandle)
Asynchronous finish function for TPM2_EvictControl
This function returns the results of a TPM2_EvictControl command invoked via Esys_EvictControl_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	newObjectHandle 	ESYS_TR handle of ESYS resource for TPM2_HANDLE. 	
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. 	

The ESAPI function for the TPM2_FlushContext command.
Functions
TSS2_RC Esys_FlushContext_Async (ESYS_CONTEXT *esysContext, ESYS_TR flushHandle)
TSS2_RC Esys_FlushContext (ESYS_CONTEXT *esysContext, ESYS_TR flushHandle)
TSS2_RC Esys_FlushContext_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_FlushContext command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_FlushContext (ESYS_CONTEXT *  esysContext, ESYS_TR  flushHandle)
One-Call function for TPM2_FlushContext
This function invokes the TPM2_FlushContext command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	flushHandle 	The handle of the item to flush. 	
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_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_FlushContext_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  flushHandle)
Asynchronous function for TPM2_FlushContext
This function invokes the TPM2_FlushContext 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_FlushContext_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	flushHandle 	The handle of the item to flush. 	
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_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_FlushContext_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_FlushContext
This function returns the results of a TPM2_FlushContext command invoked via Esys_FlushContext_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_GetCapability command.
Functions
TSS2_RC Esys_GetCapability_Async (ESYS_CONTEXT *esysContext, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPM2_CAP capability, UINT32 property, UINT32 propertyCount)
TSS2_RC Esys_GetCapability (ESYS_CONTEXT *esysContext, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPM2_CAP capability, UINT32 property, UINT32 propertyCount, TPMI_YES_NO *moreData, TPMS_CAPABILITY_DATA **capabilityData)
TSS2_RC Esys_GetCapability_Finish (ESYS_CONTEXT *esysContext, TPMI_YES_NO *moreData, TPMS_CAPABILITY_DATA **capabilityData)

Detailed Description
ESAPI function to invoke the TPM2_GetCapability command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_GetCapability (ESYS_CONTEXT *  esysContext, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPM2_CAP  capability, UINT32  property, UINT32  propertyCount, TPMI_YES_NO *  moreData, TPMS_CAPABILITY_DATA **  capabilityData)
One-Call function for TPM2_GetCapability
This function invokes the TPM2_GetCapability command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	capability 	Group selection; determines the format of the response. 	
in	property 	Further definition of information. 	
in	propertyCount 	Number of properties of the indicated type to return. 	
out	moreData 	Flag to indicate if there are more values of this type. (callee-allocated) 	
out	capabilityData 	The capability data. (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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_GetCapability_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPM2_CAP  capability, UINT32  property, UINT32  propertyCount)
Asynchronous function for TPM2_GetCapability
This function invokes the TPM2_GetCapability 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_GetCapability_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	capability 	Group selection; determines the format of the response. 	
in	property 	Further definition of information. 	
in	propertyCount 	Number of properties of the indicated type to return. 	
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_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. 	
TSS2_RC Esys_GetCapability_Finish (ESYS_CONTEXT *  esysContext, TPMI_YES_NO *  moreData, TPMS_CAPABILITY_DATA **  capabilityData)
Asynchronous finish function for TPM2_GetCapability
This function returns the results of a TPM2_GetCapability command invoked via Esys_GetCapability_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	moreData 	Flag to indicate if there are more values of this type. (callee-allocated) 	
out	capabilityData 	The capability data. (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. 	

The ESAPI function for the TPM2_GetCommandAuditDigest command.
Functions
TSS2_RC Esys_GetCommandAuditDigest_Async (ESYS_CONTEXT *esysContext, ESYS_TR privacyHandle, ESYS_TR signHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DATA *qualifyingData, const TPMT_SIG_SCHEME *inScheme)
TSS2_RC Esys_GetCommandAuditDigest (ESYS_CONTEXT *esysContext, ESYS_TR privacyHandle, ESYS_TR signHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DATA *qualifyingData, const TPMT_SIG_SCHEME *inScheme, TPM2B_ATTEST **auditInfo, TPMT_SIGNATURE **signature)
TSS2_RC Esys_GetCommandAuditDigest_Finish (ESYS_CONTEXT *esysContext, TPM2B_ATTEST **auditInfo, TPMT_SIGNATURE **signature)

Detailed Description
ESAPI function to invoke the TPM2_GetCommandAuditDigest command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_GetCommandAuditDigest (ESYS_CONTEXT *  esysContext, ESYS_TR  privacyHandle, ESYS_TR  signHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DATA *  qualifyingData, const TPMT_SIG_SCHEME *  inScheme, TPM2B_ATTEST **  auditInfo, TPMT_SIGNATURE **  signature)
One-Call function for TPM2_GetCommandAuditDigest
This function invokes the TPM2_GetCommandAuditDigest command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	privacyHandle 	TPM2_Handle of the privacy administrator (TPM2_RH_ENDORSEMENT). 	
in	signHandle 	The handle of the signing key. 	
in	shandle1 	Session handle for authorization of privacyHandle 	
in	shandle2 	Session handle for authorization of signHandle 	
in	shandle3 	Third session handle. 	
in	qualifyingData 	Other data to associate with this audit digest. 	
in	inScheme 	TPM2_Signing scheme to use if the scheme for signHandle is TPM2_ALG_NULL. 	
out	auditInfo 	The auditInfo that was signed. (callee-allocated) 	
out	signature 	The signature over auditInfo. (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_GetCommandAuditDigest_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  privacyHandle, ESYS_TR  signHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DATA *  qualifyingData, const TPMT_SIG_SCHEME *  inScheme)
Asynchronous function for TPM2_GetCommandAuditDigest
This function invokes the TPM2_GetCommandAuditDigest 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_GetCommandAuditDigest_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	privacyHandle 	TPM2_Handle of the privacy administrator (TPM2_RH_ENDORSEMENT). 	
in	signHandle 	The handle of the signing key. 	
in	shandle1 	Session handle for authorization of privacyHandle 	
in	shandle2 	Session handle for authorization of signHandle 	
in	shandle3 	Third session handle. 	
in	qualifyingData 	Other data to associate with this audit digest. 	
in	inScheme 	TPM2_Signing scheme to use if the scheme for signHandle is TPM2_ALG_NULL. 	
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_GetCommandAuditDigest_Finish (ESYS_CONTEXT *  esysContext, TPM2B_ATTEST **  auditInfo, TPMT_SIGNATURE **  signature)
Asynchronous finish function for TPM2_GetCommandAuditDigest
This function returns the results of a TPM2_GetCommandAuditDigest command invoked via Esys_GetCommandAuditDigest_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	auditInfo 	The auditInfo that was signed. (callee-allocated) 	
out	signature 	The signature over auditInfo. (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. 	

The ESAPI function for the TPM2_GetRandom command.
Functions
TSS2_RC Esys_GetRandom_Async (ESYS_CONTEXT *esysContext, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, UINT16 bytesRequested)
TSS2_RC Esys_GetRandom (ESYS_CONTEXT *esysContext, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, UINT16 bytesRequested, TPM2B_DIGEST **randomBytes)
TSS2_RC Esys_GetRandom_Finish (ESYS_CONTEXT *esysContext, TPM2B_DIGEST **randomBytes)

Detailed Description
ESAPI function to invoke the TPM2_GetRandom command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_GetRandom (ESYS_CONTEXT *  esysContext, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, UINT16  bytesRequested, TPM2B_DIGEST **  randomBytes)
One-Call function for TPM2_GetRandom
This function invokes the TPM2_GetRandom command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	bytesRequested 	Number of octets to return. 	
out	randomBytes 	The random octets. (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_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_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_GetRandom_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, UINT16  bytesRequested)
Asynchronous function for TPM2_GetRandom
This function invokes the TPM2_GetRandom 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_GetRandom_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	bytesRequested 	Number of octets to return. 	
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_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_RC Esys_GetRandom_Finish (ESYS_CONTEXT *  esysContext, TPM2B_DIGEST **  randomBytes)
Asynchronous finish function for TPM2_GetRandom
This function returns the results of a TPM2_GetRandom command invoked via Esys_GetRandom_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	randomBytes 	The random octets. (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. 	

The ESAPI function for the TPM2_GetSessionAuditDigest command.
Functions
TSS2_RC Esys_GetSessionAuditDigest_Async (ESYS_CONTEXT *esysContext, ESYS_TR privacyAdminHandle, ESYS_TR signHandle, ESYS_TR sessionHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DATA *qualifyingData, const TPMT_SIG_SCHEME *inScheme)
TSS2_RC Esys_GetSessionAuditDigest (ESYS_CONTEXT *esysContext, ESYS_TR privacyAdminHandle, ESYS_TR signHandle, ESYS_TR sessionHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DATA *qualifyingData, const TPMT_SIG_SCHEME *inScheme, TPM2B_ATTEST **auditInfo, TPMT_SIGNATURE **signature)
TSS2_RC Esys_GetSessionAuditDigest_Finish (ESYS_CONTEXT *esysContext, TPM2B_ATTEST **auditInfo, TPMT_SIGNATURE **signature)

Detailed Description
ESAPI function to invoke the TPM2_GetSessionAuditDigest command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_GetSessionAuditDigest (ESYS_CONTEXT *  esysContext, ESYS_TR  privacyAdminHandle, ESYS_TR  signHandle, ESYS_TR  sessionHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DATA *  qualifyingData, const TPMT_SIG_SCHEME *  inScheme, TPM2B_ATTEST **  auditInfo, TPMT_SIGNATURE **  signature)
One-Call function for TPM2_GetSessionAuditDigest
This function invokes the TPM2_GetSessionAuditDigest command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	privacyAdminHandle 	TPM2_Handle of the privacy administrator (TPM2_RH_ENDORSEMENT). 	
in	signHandle 	Handle of the signing key. 	
in	sessionHandle 	Handle of the audit session. 	
in	shandle1 	Session handle for authorization of privacyAdminHandle 	
in	shandle2 	Session handle for authorization of signHandle 	
in	shandle3 	Third session handle. 	
in	qualifyingData 	User-provided qualifying data - may be zero-length. 	
in	inScheme 	TPM2_Signing scheme to use if the scheme for signHandle is TPM2_ALG_NULL. 	
out	auditInfo 	The audit information that was signed. (callee-allocated) 	
out	signature 	The signature over auditInfo. (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_GetSessionAuditDigest_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  privacyAdminHandle, ESYS_TR  signHandle, ESYS_TR  sessionHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DATA *  qualifyingData, const TPMT_SIG_SCHEME *  inScheme)
Asynchronous function for TPM2_GetSessionAuditDigest
This function invokes the TPM2_GetSessionAuditDigest 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_GetSessionAuditDigest_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	privacyAdminHandle 	TPM2_Handle of the privacy administrator (TPM2_RH_ENDORSEMENT). 	
in	signHandle 	Handle of the signing key. 	
in	sessionHandle 	Handle of the audit session. 	
in	shandle1 	Session handle for authorization of privacyAdminHandle 	
in	shandle2 	Session handle for authorization of signHandle 	
in	shandle3 	Third session handle. 	
in	qualifyingData 	User-provided qualifying data - may be zero-length. 	
in	inScheme 	TPM2_Signing scheme to use if the scheme for signHandle is TPM2_ALG_NULL. 	
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_GetSessionAuditDigest_Finish (ESYS_CONTEXT *  esysContext, TPM2B_ATTEST **  auditInfo, TPMT_SIGNATURE **  signature)
Asynchronous finish function for TPM2_GetSessionAuditDigest
This function returns the results of a TPM2_GetSessionAuditDigest command invoked via Esys_GetSessionAuditDigest_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	auditInfo 	The audit information that was signed. (callee-allocated) 	
out	signature 	The signature over auditInfo. (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. 	

The ESAPI function for the TPM2_GetTestResult command.
Functions
TSS2_RC Esys_GetTestResult_Async (ESYS_CONTEXT *esysContext, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_GetTestResult (ESYS_CONTEXT *esysContext, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPM2B_MAX_BUFFER **outData, TPM2_RC *testResult)
TSS2_RC Esys_GetTestResult_Finish (ESYS_CONTEXT *esysContext, TPM2B_MAX_BUFFER **outData, TPM2_RC *testResult)

Detailed Description
ESAPI function to invoke the TPM2_GetTestResult command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_GetTestResult (ESYS_CONTEXT *  esysContext, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPM2B_MAX_BUFFER **  outData, TPM2_RC *  testResult)
One-Call function for TPM2_GetTestResult
This function invokes the TPM2_GetTestResult command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
out	outData 	Test result data. (callee-allocated) 	
out	testResult 	. (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_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_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_GetTestResult_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
Asynchronous function for TPM2_GetTestResult
This function invokes the TPM2_GetTestResult 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_GetTestResult_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	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_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_RC Esys_GetTestResult_Finish (ESYS_CONTEXT *  esysContext, TPM2B_MAX_BUFFER **  outData, TPM2_RC *  testResult)
Asynchronous finish function for TPM2_GetTestResult
This function returns the results of a TPM2_GetTestResult command invoked via Esys_GetTestResult_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	outData 	Test result data. (callee-allocated) 	
out	testResult 	. (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. 	

The ESAPI function for the TPM2_GetTime command.
Functions
TSS2_RC Esys_GetTime_Async (ESYS_CONTEXT *esysContext, ESYS_TR privacyAdminHandle, ESYS_TR signHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DATA *qualifyingData, const TPMT_SIG_SCHEME *inScheme)
TSS2_RC Esys_GetTime (ESYS_CONTEXT *esysContext, ESYS_TR privacyAdminHandle, ESYS_TR signHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DATA *qualifyingData, const TPMT_SIG_SCHEME *inScheme, TPM2B_ATTEST **timeInfo, TPMT_SIGNATURE **signature)
TSS2_RC Esys_GetTime_Finish (ESYS_CONTEXT *esysContext, TPM2B_ATTEST **timeInfo, TPMT_SIGNATURE **signature)

Detailed Description
ESAPI function to invoke the TPM2_GetTime command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_GetTime (ESYS_CONTEXT *  esysContext, ESYS_TR  privacyAdminHandle, ESYS_TR  signHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DATA *  qualifyingData, const TPMT_SIG_SCHEME *  inScheme, TPM2B_ATTEST **  timeInfo, TPMT_SIGNATURE **  signature)
One-Call function for TPM2_GetTime
This function invokes the TPM2_GetTime command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	privacyAdminHandle 	TPM2_Handle of the privacy administrator (TPM2_RH_ENDORSEMENT). 	
in	signHandle 	The keyHandle identifier of a loaded key that can perform digital signatures. 	
in	shandle1 	Session handle for authorization of privacyAdminHandle 	
in	shandle2 	Session handle for authorization of signHandle 	
in	shandle3 	Third session handle. 	
in	qualifyingData 	Data to tick stamp. 	
in	inScheme 	TPM2_Signing scheme to use if the scheme for signHandle is TPM2_ALG_NULL. 	
out	timeInfo 	Standard TPM-generated attestation block. (callee-allocated) 	
out	signature 	The signature over timeInfo . (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_GetTime_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  privacyAdminHandle, ESYS_TR  signHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DATA *  qualifyingData, const TPMT_SIG_SCHEME *  inScheme)
Asynchronous function for TPM2_GetTime
This function invokes the TPM2_GetTime 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_GetTime_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	privacyAdminHandle 	TPM2_Handle of the privacy administrator (TPM2_RH_ENDORSEMENT). 	
in	signHandle 	The keyHandle identifier of a loaded key that can perform digital signatures. 	
in	shandle1 	Session handle for authorization of privacyAdminHandle 	
in	shandle2 	Session handle for authorization of signHandle 	
in	shandle3 	Third session handle. 	
in	qualifyingData 	Data to tick stamp. 	
in	inScheme 	TPM2_Signing scheme to use if the scheme for signHandle is TPM2_ALG_NULL. 	
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_GetTime_Finish (ESYS_CONTEXT *  esysContext, TPM2B_ATTEST **  timeInfo, TPMT_SIGNATURE **  signature)
Asynchronous finish function for TPM2_GetTime
This function returns the results of a TPM2_GetTime command invoked via Esys_GetTime_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	timeInfo 	Standard TPM-generated attestation block. (callee-allocated) 	
out	signature 	The signature over timeInfo . (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. 	

The ESAPI function for the TPM2_Hash command.
Functions
TSS2_RC Esys_Hash_Finish (ESYS_CONTEXT *esysContext, TPM2B_DIGEST **outHash, TPMT_TK_HASHCHECK **validation)

Detailed Description
ESAPI function to invoke the TPM2_Hash command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_Hash_Finish (ESYS_CONTEXT *  esysContext, TPM2B_DIGEST **  outHash, TPMT_TK_HASHCHECK **  validation)
Asynchronous finish function for TPM2_Hash
This function returns the results of a TPM2_Hash command invoked via Esys_Hash_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	outHash 	Results. (callee-allocated) 	
out	validation 	TPM2_Ticket indicating that the sequence of octets used to compute outDigest did not start with TPM2_GENERATED_VALUE. (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. 	

The ESAPI function for the TPM2_HashSequenceStart command.
Functions
TSS2_RC Esys_HashSequenceStart_Async (ESYS_CONTEXT *esysContext, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_AUTH *auth, TPMI_ALG_HASH hashAlg)
TSS2_RC Esys_HashSequenceStart (ESYS_CONTEXT *esysContext, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_AUTH *auth, TPMI_ALG_HASH hashAlg, ESYS_TR *sequenceHandle)
TSS2_RC Esys_HashSequenceStart_Finish (ESYS_CONTEXT *esysContext, ESYS_TR *sequenceHandle)

Detailed Description
ESAPI function to invoke the TPM2_HashSequenceStart command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_HashSequenceStart (ESYS_CONTEXT *  esysContext, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_AUTH *  auth, TPMI_ALG_HASH  hashAlg, ESYS_TR *  sequenceHandle)
One-Call function for TPM2_HashSequenceStart
This function invokes the TPM2_HashSequenceStart command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	auth 	Authorization value for subsequent use of the sequence. 	
in	hashAlg 	The hash algorithm to use for the hash sequence. 	
out	sequenceHandle 	ESYS_TR handle of ESYS resource for TPMI_DH_OBJECT. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_HashSequenceStart_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_AUTH *  auth, TPMI_ALG_HASH  hashAlg)
Asynchronous function for TPM2_HashSequenceStart
This function invokes the TPM2_HashSequenceStart 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_HashSequenceStart_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	auth 	Authorization value for subsequent use of the sequence. 	
in	hashAlg 	The hash algorithm to use for the hash sequence. 	
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_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. 	
TSS2_RC Esys_HashSequenceStart_Finish (ESYS_CONTEXT *  esysContext, ESYS_TR *  sequenceHandle)
Asynchronous finish function for TPM2_HashSequenceStart
This function returns the results of a TPM2_HashSequenceStart command invoked via Esys_HashSequenceStart_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	sequenceHandle 	ESYS_TR handle of ESYS resource for TPMI_DH_OBJECT. 	
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. 	

The ESAPI function for the TPM2_HierarchyChangeAuth command.
Functions
TSS2_RC Esys_HierarchyChangeAuth_Async (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_AUTH *newAuth)
TSS2_RC Esys_HierarchyChangeAuth (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_AUTH *newAuth)
TSS2_RC Esys_HierarchyChangeAuth_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_HierarchyChangeAuth command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_HierarchyChangeAuth (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_AUTH *  newAuth)
One-Call function for TPM2_HierarchyChangeAuth
This function invokes the TPM2_HierarchyChangeAuth command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	TPM2_RH_LOCKOUT, TPM2_RH_ENDORSEMENT, TPM2_RH_OWNER or TPM2_RH_PLATFORM+{PP}. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	newAuth 	New authorization value. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_HierarchyChangeAuth_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_AUTH *  newAuth)
Asynchronous function for TPM2_HierarchyChangeAuth
This function invokes the TPM2_HierarchyChangeAuth 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_HierarchyChangeAuth_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	TPM2_RH_LOCKOUT, TPM2_RH_ENDORSEMENT, TPM2_RH_OWNER or TPM2_RH_PLATFORM+{PP}. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	newAuth 	New authorization value. 	
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_ENCRYPT_PARAM 	if one of the sessions has the 'encrypt' attribute set and the command does not support encryption of the first response parameter. 	
TSS2_RC Esys_HierarchyChangeAuth_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_HierarchyChangeAuth
This function returns the results of a TPM2_HierarchyChangeAuth command invoked via Esys_HierarchyChangeAuth_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_HierarchyControl command.
Functions
TSS2_RC Esys_HierarchyControl_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_HierarchyControl command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_HierarchyControl_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_HierarchyControl
This function returns the results of a TPM2_HierarchyControl command invoked via Esys_HierarchyControl_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_HMAC command.
Functions
TSS2_RC Esys_HMAC_Async (ESYS_CONTEXT *esysContext, ESYS_TR handle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_MAX_BUFFER *buffer, TPMI_ALG_HASH hashAlg)
TSS2_RC Esys_HMAC (ESYS_CONTEXT *esysContext, ESYS_TR handle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_MAX_BUFFER *buffer, TPMI_ALG_HASH hashAlg, TPM2B_DIGEST **outHMAC)
TSS2_RC Esys_HMAC_Finish (ESYS_CONTEXT *esysContext, TPM2B_DIGEST **outHMAC)

Detailed Description
ESAPI function to invoke the TPM2_HMAC command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_HMAC (ESYS_CONTEXT *  esysContext, ESYS_TR  handle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_MAX_BUFFER *  buffer, TPMI_ALG_HASH  hashAlg, TPM2B_DIGEST **  outHMAC)
One-Call function for TPM2_HMAC
This function invokes the TPM2_HMAC command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	handle 	Handle for the symmetric signing key providing the HMAC key. 	
in	shandle1 	Session handle for authorization of handle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	buffer 	HMAC data. 	
in	hashAlg 	Algorithm to use for HMAC. 	
out	outHMAC 	The returned HMAC in a sized buffer. (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_HMAC_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  handle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_MAX_BUFFER *  buffer, TPMI_ALG_HASH  hashAlg)
Asynchronous function for TPM2_HMAC
This function invokes the TPM2_HMAC 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_HMAC_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	handle 	Handle for the symmetric signing key providing the HMAC key. 	
in	shandle1 	Session handle for authorization of handle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	buffer 	HMAC data. 	
in	hashAlg 	Algorithm to use for HMAC. 	
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_HMAC_Finish (ESYS_CONTEXT *  esysContext, TPM2B_DIGEST **  outHMAC)
Asynchronous finish function for TPM2_HMAC
This function returns the results of a TPM2_HMAC command invoked via Esys_HMAC_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	outHMAC 	The returned HMAC in a sized buffer. (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. 	

The ESAPI function for the TPM2_HMAC_Start command.
Functions
TSS2_RC Esys_HMAC_Start_Async (ESYS_CONTEXT *esysContext, ESYS_TR handle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_AUTH *auth, TPMI_ALG_HASH hashAlg)
TSS2_RC Esys_HMAC_Start (ESYS_CONTEXT *esysContext, ESYS_TR handle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_AUTH *auth, TPMI_ALG_HASH hashAlg, ESYS_TR *sequenceHandle)
TSS2_RC Esys_HMAC_Start_Finish (ESYS_CONTEXT *esysContext, ESYS_TR *sequenceHandle)

Detailed Description
ESAPI function to invoke the TPM2_HMAC_Start command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_HMAC_Start (ESYS_CONTEXT *  esysContext, ESYS_TR  handle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_AUTH *  auth, TPMI_ALG_HASH  hashAlg, ESYS_TR *  sequenceHandle)
One-Call function for TPM2_HMAC_Start
This function invokes the TPM2_HMAC_Start command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	handle 	Handle of an HMAC key. 	
in	shandle1 	Session handle for authorization of handle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	auth 	Authorization value for subsequent use of the sequence. 	
in	hashAlg 	The hash algorithm to use for the HMAC. 	
out	sequenceHandle 	ESYS_TR handle of ESYS resource for TPMI_DH_OBJECT. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_HMAC_Start_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  handle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_AUTH *  auth, TPMI_ALG_HASH  hashAlg)
Asynchronous function for TPM2_HMAC_Start
This function invokes the TPM2_HMAC_Start 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_HMAC_Start_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	handle 	Handle of an HMAC key. 	
in	shandle1 	Session handle for authorization of handle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	auth 	Authorization value for subsequent use of the sequence. 	
in	hashAlg 	The hash algorithm to use for the HMAC. 	
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_ENCRYPT_PARAM 	if one of the sessions has the 'encrypt' attribute set and the command does not support encryption of the first response parameter. 	
TSS2_RC Esys_HMAC_Start_Finish (ESYS_CONTEXT *  esysContext, ESYS_TR *  sequenceHandle)
Asynchronous finish function for TPM2_HMAC_Start
This function returns the results of a TPM2_HMAC_Start command invoked via Esys_HMAC_Start_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	sequenceHandle 	ESYS_TR handle of ESYS resource for TPMI_DH_OBJECT. 	
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. 	

The ESAPI function for the TPM2_Import command.
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
ESAPI function to invoke the TPM2_Import command either as a one-call or in an asynchronous manner. 

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 function invokes the TPM2_Import command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	parentHandle 	The handle of the new parent for the object. 	
in	shandle1 	Session handle for authorization of parentHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	encryptionKey 	The optional symmetric encryption key used as the inner wrapper for duplicate. 	
in	objectPublic 	The public area of the object to be imported. 	
in	duplicate 	The symmetrically encrypted duplicate object that may contain an inner symmetric wrapper. 	
in	inSymSeed 	The seed for the symmetric key and HMAC key. 	
in	symmetricAlg 	Definition for the symmetric algorithm to use for the inner wrapper. 	
out	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 function invokes the TPM2_Import 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_Import_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	parentHandle 	The handle of the new parent for the object. 	
in	shandle1 	Session handle for authorization of parentHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	encryptionKey 	The optional symmetric encryption key used as the inner wrapper for duplicate. 	
in	objectPublic 	The public area of the object to be imported. 	
in	duplicate 	The symmetrically encrypted duplicate object that may contain an inner symmetric wrapper. 	
in	inSymSeed 	The seed for the symmetric key and HMAC key. 	
in	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. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	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. 	

The ESAPI function for the TPM2_IncrementalSelfTest command.
Functions
TSS2_RC Esys_IncrementalSelfTest_Async (ESYS_CONTEXT *esysContext, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPML_ALG *toTest)
TSS2_RC Esys_IncrementalSelfTest (ESYS_CONTEXT *esysContext, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPML_ALG *toTest, TPML_ALG **toDoList)
TSS2_RC Esys_IncrementalSelfTest_Finish (ESYS_CONTEXT *esysContext, TPML_ALG **toDoList)

Detailed Description
ESAPI function to invoke the TPM2_IncrementalSelfTest command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_IncrementalSelfTest (ESYS_CONTEXT *  esysContext, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPML_ALG *  toTest, TPML_ALG **  toDoList)
One-Call function for TPM2_IncrementalSelfTest
This function invokes the TPM2_IncrementalSelfTest command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	toTest 	List of algorithms that should be tested. 	
out	toDoList 	List of algorithms that need testing. (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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_IncrementalSelfTest_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPML_ALG *  toTest)
Asynchronous function for TPM2_IncrementalSelfTest
This function invokes the TPM2_IncrementalSelfTest 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_IncrementalSelfTest_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	toTest 	List of algorithms that should be tested. 	
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_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. 	
TSS2_RC Esys_IncrementalSelfTest_Finish (ESYS_CONTEXT *  esysContext, TPML_ALG **  toDoList)
Asynchronous finish function for TPM2_IncrementalSelfTest
This function returns the results of a TPM2_IncrementalSelfTest command invoked via Esys_IncrementalSelfTest_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	toDoList 	List of algorithms that need testing. (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. 	

The ESAPI function for the TPM2_Load command.
Functions
TSS2_RC Esys_Load_Async (ESYS_CONTEXT *esysContext, ESYS_TR parentHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_PRIVATE *inPrivate, const TPM2B_PUBLIC *inPublic)
TSS2_RC Esys_Load (ESYS_CONTEXT *esysContext, ESYS_TR parentHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_PRIVATE *inPrivate, const TPM2B_PUBLIC *inPublic, ESYS_TR *objectHandle)

Detailed Description
ESAPI function to invoke the TPM2_Load command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_Load (ESYS_CONTEXT *  esysContext, ESYS_TR  parentHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_PRIVATE *  inPrivate, const TPM2B_PUBLIC *  inPublic, ESYS_TR *  objectHandle)
One-Call function for TPM2_Load
This function invokes the TPM2_Load command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	parentHandle 	TPM handle of parent key; shall not be a reserved handle. 	
in	shandle1 	Session handle for authorization of parentHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	inPrivate 	The private portion of the object. 	
in	inPublic 	The public portion of the object. 	
out	objectHandle 	ESYS_TR handle of ESYS resource for TPM2_HANDLE. 	
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_Load_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  parentHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_PRIVATE *  inPrivate, const TPM2B_PUBLIC *  inPublic)
Asynchronous function for TPM2_Load
This function invokes the TPM2_Load 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_Load_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	parentHandle 	TPM handle of parent key; shall not be a reserved handle. 	
in	shandle1 	Session handle for authorization of parentHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	inPrivate 	The private portion of the object. 	
in	inPublic 	The public portion of the object. 	
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. 	

The ESAPI function for the TPM2_LoadExternal command.
Functions
TSS2_RC Esys_LoadExternal_Finish (ESYS_CONTEXT *esysContext, ESYS_TR *objectHandle)
TSS2_RC Esys_Load_Finish (ESYS_CONTEXT *esysContext, ESYS_TR *objectHandle)

Detailed Description
ESAPI function to invoke the TPM2_LoadExternal command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_Load_Finish (ESYS_CONTEXT *  esysContext, ESYS_TR *  objectHandle)
Asynchronous finish function for TPM2_Load
This function returns the results of a TPM2_Load command invoked via Esys_Load_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	objectHandle 	ESYS_TR handle of ESYS resource for TPM2_HANDLE. 	
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. 	
TSS2_RC Esys_LoadExternal_Finish (ESYS_CONTEXT *  esysContext, ESYS_TR *  objectHandle)
Asynchronous finish function for TPM2_LoadExternal
This function returns the results of a TPM2_LoadExternal command invoked via Esys_LoadExternal_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	objectHandle 	ESYS_TR handle of ESYS resource for TPM2_HANDLE. 	
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. 	

The ESAPI function for the TPM2_MakeCredential command.
Functions
TSS2_RC Esys_MakeCredential_Async (ESYS_CONTEXT *esysContext, ESYS_TR handle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DIGEST *credential, const TPM2B_NAME *objectName)
TSS2_RC Esys_MakeCredential (ESYS_CONTEXT *esysContext, ESYS_TR handle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DIGEST *credential, const TPM2B_NAME *objectName, TPM2B_ID_OBJECT **credentialBlob, TPM2B_ENCRYPTED_SECRET **secret)
TSS2_RC Esys_MakeCredential_Finish (ESYS_CONTEXT *esysContext, TPM2B_ID_OBJECT **credentialBlob, TPM2B_ENCRYPTED_SECRET **secret)

Detailed Description
ESAPI function to invoke the TPM2_MakeCredential command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_MakeCredential (ESYS_CONTEXT *  esysContext, ESYS_TR  handle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DIGEST *  credential, const TPM2B_NAME *  objectName, TPM2B_ID_OBJECT **  credentialBlob, TPM2B_ENCRYPTED_SECRET **  secret)
One-Call function for TPM2_MakeCredential
This function invokes the TPM2_MakeCredential command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	handle 	Loaded public area, used to encrypt the sensitive area containing the credential key. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	credential 	The credential information. 	
in	objectName 	Name of the object to which the credential applies. 	
out	credentialBlob 	The credential. (callee-allocated) 	
out	secret 	Handle algorithm-dependent data that wraps the key that encrypts credentialBlob. (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_MakeCredential_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  handle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DIGEST *  credential, const TPM2B_NAME *  objectName)
Asynchronous function for TPM2_MakeCredential
This function invokes the TPM2_MakeCredential 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_MakeCredential_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	handle 	Loaded public area, used to encrypt the sensitive area containing the credential key. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	credential 	The credential information. 	
in	objectName 	Name of the object to which the credential applies. 	
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_MakeCredential_Finish (ESYS_CONTEXT *  esysContext, TPM2B_ID_OBJECT **  credentialBlob, TPM2B_ENCRYPTED_SECRET **  secret)
Asynchronous finish function for TPM2_MakeCredential
This function returns the results of a TPM2_MakeCredential command invoked via Esys_MakeCredential_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	credentialBlob 	The credential. (callee-allocated) 	
out	secret 	Handle algorithm-dependent data that wraps the key that encrypts credentialBlob. (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. 	

The ESAPI function for the TPM2_NV_Certify command.
Functions
TSS2_RC Esys_NV_Certify_Async (ESYS_CONTEXT *esysContext, ESYS_TR signHandle, ESYS_TR authHandle, ESYS_TR nvIndex, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DATA *qualifyingData, const TPMT_SIG_SCHEME *inScheme, UINT16 size, UINT16 offset)
TSS2_RC Esys_NV_Certify (ESYS_CONTEXT *esysContext, ESYS_TR signHandle, ESYS_TR authHandle, ESYS_TR nvIndex, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DATA *qualifyingData, const TPMT_SIG_SCHEME *inScheme, UINT16 size, UINT16 offset, TPM2B_ATTEST **certifyInfo, TPMT_SIGNATURE **signature)
TSS2_RC Esys_NV_Certify_Finish (ESYS_CONTEXT *esysContext, TPM2B_ATTEST **certifyInfo, TPMT_SIGNATURE **signature)

Detailed Description
ESAPI function to invoke the TPM2_NV_Certify command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_NV_Certify (ESYS_CONTEXT *  esysContext, ESYS_TR  signHandle, ESYS_TR  authHandle, ESYS_TR  nvIndex, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DATA *  qualifyingData, const TPMT_SIG_SCHEME *  inScheme, UINT16  size, UINT16  offset, TPM2B_ATTEST **  certifyInfo, TPMT_SIGNATURE **  signature)
One-Call function for TPM2_NV_Certify
This function invokes the TPM2_NV_Certify command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	signHandle 	Handle of the key used to sign the attestation structure. 	
in	authHandle 	Handle indicating the source of the authorization value for the NV Index. 	
in	nvIndex 	Index for the area to be certified. 	
in	shandle1 	Session handle for authorization of signHandle 	
in	shandle2 	Session handle for authorization of authHandle 	
in	shandle3 	Third session handle. 	
in	qualifyingData 	User-provided qualifying data. 	
in	inScheme 	TPM2_Signing scheme to use if the scheme for signHandle is TPM2_ALG_NULL. 	
in	size 	Number of octets to certify. 	
in	offset 	Octet offset into the area. 	
out	certifyInfo 	The structure that was signed. (callee-allocated) 	
out	signature 	The asymmetric signature over certifyInfo using the key referenced by signHandle. (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_NV_Certify_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  signHandle, ESYS_TR  authHandle, ESYS_TR  nvIndex, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DATA *  qualifyingData, const TPMT_SIG_SCHEME *  inScheme, UINT16  size, UINT16  offset)
Asynchronous function for TPM2_NV_Certify
This function invokes the TPM2_NV_Certify 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_NV_Certify_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	signHandle 	Handle of the key used to sign the attestation structure. 	
in	authHandle 	Handle indicating the source of the authorization value for the NV Index. 	
in	nvIndex 	Index for the area to be certified. 	
in	shandle1 	Session handle for authorization of signHandle 	
in	shandle2 	Session handle for authorization of authHandle 	
in	shandle3 	Third session handle. 	
in	qualifyingData 	User-provided qualifying data. 	
in	inScheme 	TPM2_Signing scheme to use if the scheme for signHandle is TPM2_ALG_NULL. 	
in	size 	Number of octets to certify. 	
in	offset 	Octet offset into the area. 	
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_NV_Certify_Finish (ESYS_CONTEXT *  esysContext, TPM2B_ATTEST **  certifyInfo, TPMT_SIGNATURE **  signature)
Asynchronous finish function for TPM2_NV_Certify
This function returns the results of a TPM2_NV_Certify command invoked via Esys_NV_Certify_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	certifyInfo 	The structure that was signed. (callee-allocated) 	
out	signature 	The asymmetric signature over certifyInfo using the key referenced by signHandle. (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. 	

The ESAPI function for the TPM2_NV_ChangeAuth command.
Functions
TSS2_RC Esys_NV_ChangeAuth_Async (ESYS_CONTEXT *esysContext, ESYS_TR nvIndex, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_AUTH *newAuth)
TSS2_RC Esys_NV_ChangeAuth (ESYS_CONTEXT *esysContext, ESYS_TR nvIndex, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_AUTH *newAuth)
TSS2_RC Esys_NV_ChangeAuth_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_NV_ChangeAuth command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_NV_ChangeAuth (ESYS_CONTEXT *  esysContext, ESYS_TR  nvIndex, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_AUTH *  newAuth)
One-Call function for TPM2_NV_ChangeAuth
This function invokes the TPM2_NV_ChangeAuth command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	nvIndex 	Handle of the entity. 	
in	shandle1 	Session handle for authorization of nvIndex 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	newAuth 	New authorization value. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_NV_ChangeAuth_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  nvIndex, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_AUTH *  newAuth)
Asynchronous function for TPM2_NV_ChangeAuth
This function invokes the TPM2_NV_ChangeAuth 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_NV_ChangeAuth_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	nvIndex 	Handle of the entity. 	
in	shandle1 	Session handle for authorization of nvIndex 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	newAuth 	New authorization value. 	
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_ENCRYPT_PARAM 	if one of the sessions has the 'encrypt' attribute set and the command does not support encryption of the first response parameter. 	
TSS2_RC Esys_NV_ChangeAuth_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_NV_ChangeAuth
This function returns the results of a TPM2_NV_ChangeAuth command invoked via Esys_NV_ChangeAuth_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_NV_DefineSpace command.
Functions
TSS2_RC Esys_NV_DefineSpace_Async (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_AUTH *auth, const TPM2B_NV_PUBLIC *publicInfo)
TSS2_RC Esys_NV_DefineSpace (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_AUTH *auth, const TPM2B_NV_PUBLIC *publicInfo, ESYS_TR *nvHandle)
TSS2_RC Esys_NV_DefineSpace_Finish (ESYS_CONTEXT *esysContext, ESYS_TR *nvHandle)

Detailed Description
ESAPI function to invoke the TPM2_NV_DefineSpace command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_NV_DefineSpace (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_AUTH *  auth, const TPM2B_NV_PUBLIC *  publicInfo, ESYS_TR *  nvHandle)
One-Call function for TPM2_NV_DefineSpace
This function invokes the TPM2_NV_DefineSpace command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	TPM2_RH_OWNER or TPM2_RH_PLATFORM+{PP}. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	auth 	The authorization value. 	
in	publicInfo 	The public parameters of the NV area. 	
out	nvHandle 	ESYS_TR handle of ESYS resource for TPM2_HANDLE. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_NV_DefineSpace_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_AUTH *  auth, const TPM2B_NV_PUBLIC *  publicInfo)
Asynchronous function for TPM2_NV_DefineSpace
This function invokes the TPM2_NV_DefineSpace 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_NV_DefineSpace_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	TPM2_RH_OWNER or TPM2_RH_PLATFORM+{PP}. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	auth 	The authorization value. 	
in	publicInfo 	The public parameters of the NV area. 	
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_ENCRYPT_PARAM 	if one of the sessions has the 'encrypt' attribute set and the command does not support encryption of the first response parameter. 	
TSS2_RC Esys_NV_DefineSpace_Finish (ESYS_CONTEXT *  esysContext, ESYS_TR *  nvHandle)
Asynchronous finish function for TPM2_NV_DefineSpace
This function returns the results of a TPM2_NV_DefineSpace command invoked via Esys_NV_DefineSpace_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	nvHandle 	ESYS_TR handle of ESYS resource for TPM2_HANDLE. 	
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. 	

The ESAPI function for the TPM2_NV_Extend command.
Functions
TSS2_RC Esys_NV_Extend_Async (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR nvIndex, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_MAX_NV_BUFFER *data)
TSS2_RC Esys_NV_Extend (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR nvIndex, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_MAX_NV_BUFFER *data)
TSS2_RC Esys_NV_Extend_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_NV_Extend command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_NV_Extend (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  nvIndex, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_MAX_NV_BUFFER *  data)
One-Call function for TPM2_NV_Extend
This function invokes the TPM2_NV_Extend command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	Handle indicating the source of the authorization value. 	
in	nvIndex 	The NV Index to extend. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	data 	The data to extend. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_NV_Extend_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  nvIndex, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_MAX_NV_BUFFER *  data)
Asynchronous function for TPM2_NV_Extend
This function invokes the TPM2_NV_Extend 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_NV_Extend_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	Handle indicating the source of the authorization value. 	
in	nvIndex 	The NV Index to extend. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	data 	The data to extend. 	
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_ENCRYPT_PARAM 	if one of the sessions has the 'encrypt' attribute set and the command does not support encryption of the first response parameter. 	
TSS2_RC Esys_NV_Extend_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_NV_Extend
This function returns the results of a TPM2_NV_Extend command invoked via Esys_NV_Extend_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_NV_GlobalWriteLock command.
Functions
TSS2_RC Esys_NV_GlobalWriteLock_Async (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_NV_GlobalWriteLock (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_NV_GlobalWriteLock_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_NV_GlobalWriteLock command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_NV_GlobalWriteLock (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
One-Call function for TPM2_NV_GlobalWriteLock
This function invokes the TPM2_NV_GlobalWriteLock command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	TPM2_RH_OWNER or TPM2_RH_PLATFORM+{PP}. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_NV_GlobalWriteLock_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
Asynchronous function for TPM2_NV_GlobalWriteLock
This function invokes the TPM2_NV_GlobalWriteLock 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_NV_GlobalWriteLock_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	TPM2_RH_OWNER or TPM2_RH_PLATFORM+{PP}. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	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. 	
TSS2_RC Esys_NV_GlobalWriteLock_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_NV_GlobalWriteLock
This function returns the results of a TPM2_NV_GlobalWriteLock command invoked via Esys_NV_GlobalWriteLock_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_NV_Increment command.
Functions
TSS2_RC Esys_NV_Increment_Async (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR nvIndex, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_NV_Increment (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR nvIndex, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_NV_Increment_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_NV_Increment command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_NV_Increment (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  nvIndex, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
One-Call function for TPM2_NV_Increment
This function invokes the TPM2_NV_Increment command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	Handle indicating the source of the authorization value. 	
in	nvIndex 	The NV Index to increment. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_NV_Increment_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  nvIndex, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
Asynchronous function for TPM2_NV_Increment
This function invokes the TPM2_NV_Increment 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_NV_Increment_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	Handle indicating the source of the authorization value. 	
in	nvIndex 	The NV Index to increment. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	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. 	
TSS2_RC Esys_NV_Increment_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_NV_Increment
This function returns the results of a TPM2_NV_Increment command invoked via Esys_NV_Increment_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_NV_Read command.
Functions
TSS2_RC Esys_NV_Read_Async (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR nvIndex, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, UINT16 size, UINT16 offset)
TSS2_RC Esys_NV_Read (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR nvIndex, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, UINT16 size, UINT16 offset, TPM2B_MAX_NV_BUFFER **data)
TSS2_RC Esys_NV_Read_Finish (ESYS_CONTEXT *esysContext, TPM2B_MAX_NV_BUFFER **data)

Detailed Description
ESAPI function to invoke the TPM2_NV_Read command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_NV_Read (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  nvIndex, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, UINT16  size, UINT16  offset, TPM2B_MAX_NV_BUFFER **  data)
One-Call function for TPM2_NV_Read
This function invokes the TPM2_NV_Read command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	The handle indicating the source of the authorization value. 	
in	nvIndex 	The NV Index to be read. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	size 	Number of octets to read. 	
in	offset 	Octet offset into the area. 	
out	data 	The data read. (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_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_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_NV_Read_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  nvIndex, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, UINT16  size, UINT16  offset)
Asynchronous function for TPM2_NV_Read
This function invokes the TPM2_NV_Read 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_NV_Read_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	The handle indicating the source of the authorization value. 	
in	nvIndex 	The NV Index to be read. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	size 	Number of octets to read. 	
in	offset 	Octet offset into the area. 	
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_RC Esys_NV_Read_Finish (ESYS_CONTEXT *  esysContext, TPM2B_MAX_NV_BUFFER **  data)
Asynchronous finish function for TPM2_NV_Read
This function returns the results of a TPM2_NV_Read command invoked via Esys_NV_Read_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	data 	The data read. (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. 	

The ESAPI function for the TPM2_NV_ReadLock command.
Functions
TSS2_RC Esys_NV_ReadLock_Async (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR nvIndex, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_NV_ReadLock (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR nvIndex, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_NV_ReadLock_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_NV_ReadLock command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_NV_ReadLock (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  nvIndex, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
One-Call function for TPM2_NV_ReadLock
This function invokes the TPM2_NV_ReadLock command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	The handle indicating the source of the authorization value. 	
in	nvIndex 	The NV Index to be locked. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_NV_ReadLock_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  nvIndex, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
Asynchronous function for TPM2_NV_ReadLock
This function invokes the TPM2_NV_ReadLock 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_NV_ReadLock_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	The handle indicating the source of the authorization value. 	
in	nvIndex 	The NV Index to be locked. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	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. 	
TSS2_RC Esys_NV_ReadLock_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_NV_ReadLock
This function returns the results of a TPM2_NV_ReadLock command invoked via Esys_NV_ReadLock_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_NV_ReadPublic command.
Functions
TSS2_RC Esys_NV_ReadPublic_Async (ESYS_CONTEXT *esysContext, ESYS_TR nvIndex, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_NV_ReadPublic (ESYS_CONTEXT *esysContext, ESYS_TR nvIndex, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPM2B_NV_PUBLIC **nvPublic, TPM2B_NAME **nvName)
TSS2_RC Esys_NV_ReadPublic_Finish (ESYS_CONTEXT *esysContext, TPM2B_NV_PUBLIC **nvPublic, TPM2B_NAME **nvName)

Detailed Description
ESAPI function to invoke the TPM2_NV_ReadPublic command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_NV_ReadPublic (ESYS_CONTEXT *  esysContext, ESYS_TR  nvIndex, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPM2B_NV_PUBLIC **  nvPublic, TPM2B_NAME **  nvName)
One-Call function for TPM2_NV_ReadPublic
This function invokes the TPM2_NV_ReadPublic command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	nvIndex 	The NV Index. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
out	nvPublic 	The public area of the NV Index. (callee-allocated) 	
out	nvName 	The Name of the nvIndex. (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_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_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_NV_ReadPublic_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  nvIndex, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
Asynchronous function for TPM2_NV_ReadPublic
This function invokes the TPM2_NV_ReadPublic 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_NV_ReadPublic_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	nvIndex 	The NV Index. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	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_RC Esys_NV_ReadPublic_Finish (ESYS_CONTEXT *  esysContext, TPM2B_NV_PUBLIC **  nvPublic, TPM2B_NAME **  nvName)
Asynchronous finish function for TPM2_NV_ReadPublic
This function returns the results of a TPM2_NV_ReadPublic command invoked via Esys_NV_ReadPublic_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	nvPublic 	The public area of the NV Index. (callee-allocated) 	
out	nvName 	The Name of the nvIndex. (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. 	

The ESAPI function for the TPM2_NV_SetBits command.
Functions
TSS2_RC Esys_NV_SetBits_Async (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR nvIndex, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, UINT64 bits)
TSS2_RC Esys_NV_SetBits (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR nvIndex, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, UINT64 bits)
TSS2_RC Esys_NV_SetBits_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_NV_SetBits command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_NV_SetBits (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  nvIndex, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, UINT64  bits)
One-Call function for TPM2_NV_SetBits
This function invokes the TPM2_NV_SetBits command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	Handle indicating the source of the authorization value. 	
in	nvIndex 	NV Index of the area in which the bit is to be set. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	bits 	The data to OR with the current contents. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_NV_SetBits_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  nvIndex, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, UINT64  bits)
Asynchronous function for TPM2_NV_SetBits
This function invokes the TPM2_NV_SetBits 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_NV_SetBits_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	Handle indicating the source of the authorization value. 	
in	nvIndex 	NV Index of the area in which the bit is to be set. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	bits 	The data to OR with the current contents. 	
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. 	
TSS2_RC Esys_NV_SetBits_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_NV_SetBits
This function returns the results of a TPM2_NV_SetBits command invoked via Esys_NV_SetBits_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_NV_UndefineSpace command.
Functions
TSS2_RC Esys_NV_UndefineSpace_Async (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR nvIndex, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_NV_UndefineSpace (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR nvIndex, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_NV_UndefineSpace_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_NV_UndefineSpace command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_NV_UndefineSpace (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  nvIndex, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
One-Call function for TPM2_NV_UndefineSpace
This function invokes the TPM2_NV_UndefineSpace command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	TPM2_RH_OWNER or TPM2_RH_PLATFORM+{PP}. 	
in	nvIndex 	The NV Index to remove from NV space. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_NV_UndefineSpace_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  nvIndex, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
Asynchronous function for TPM2_NV_UndefineSpace
This function invokes the TPM2_NV_UndefineSpace 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_NV_UndefineSpace_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	TPM2_RH_OWNER or TPM2_RH_PLATFORM+{PP}. 	
in	nvIndex 	The NV Index to remove from NV space. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	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. 	
TSS2_RC Esys_NV_UndefineSpace_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_NV_UndefineSpace
This function returns the results of a TPM2_NV_UndefineSpace command invoked via Esys_NV_UndefineSpace_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_NV_UndefineSpaceSpecial command.
Functions
TSS2_RC Esys_NV_UndefineSpaceSpecial_Async (ESYS_CONTEXT *esysContext, ESYS_TR nvIndex, ESYS_TR platform, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_NV_UndefineSpaceSpecial (ESYS_CONTEXT *esysContext, ESYS_TR nvIndex, ESYS_TR platform, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_NV_UndefineSpaceSpecial_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_NV_UndefineSpaceSpecial command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_NV_UndefineSpaceSpecial (ESYS_CONTEXT *  esysContext, ESYS_TR  nvIndex, ESYS_TR  platform, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
One-Call function for TPM2_NV_UndefineSpaceSpecial
This function invokes the TPM2_NV_UndefineSpaceSpecial command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	nvIndex 	Index to be deleted. 	
in	platform 	TPM2_RH_PLATFORM + {PP}. 	
in	shandle1 	Session handle for authorization of nvIndex 	
in	shandle2 	Session handle for authorization of platform 	
in	shandle3 	Third session handle. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_NV_UndefineSpaceSpecial_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  nvIndex, ESYS_TR  platform, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
Asynchronous function for TPM2_NV_UndefineSpaceSpecial
This function invokes the TPM2_NV_UndefineSpaceSpecial 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_NV_UndefineSpaceSpecial_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	nvIndex 	Index to be deleted. 	
in	platform 	TPM2_RH_PLATFORM + {PP}. 	
in	shandle1 	Session handle for authorization of nvIndex 	
in	shandle2 	Session handle for authorization of platform 	
in	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. 	
TSS2_RC Esys_NV_UndefineSpaceSpecial_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_NV_UndefineSpaceSpecial
This function returns the results of a TPM2_NV_UndefineSpaceSpecial command invoked via Esys_NV_UndefineSpaceSpecial_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_NV_Write command.
Functions
TSS2_RC Esys_NV_Write_Async (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR nvIndex, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_MAX_NV_BUFFER *data, UINT16 offset)
TSS2_RC Esys_NV_Write (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR nvIndex, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_MAX_NV_BUFFER *data, UINT16 offset)
TSS2_RC Esys_NV_Write_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_NV_Write command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_NV_Write (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  nvIndex, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_MAX_NV_BUFFER *  data, UINT16  offset)
One-Call function for TPM2_NV_Write
This function invokes the TPM2_NV_Write command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	Handle indicating the source of the authorization value. 	
in	nvIndex 	The NV Index of the area to write. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	data 	The data to write. 	
in	offset 	The offset into the NV Area. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_NV_Write_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  nvIndex, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_MAX_NV_BUFFER *  data, UINT16  offset)
Asynchronous function for TPM2_NV_Write
This function invokes the TPM2_NV_Write 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_NV_Write_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	Handle indicating the source of the authorization value. 	
in	nvIndex 	The NV Index of the area to write. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	data 	The data to write. 	
in	offset 	The offset into the NV Area. 	
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_ENCRYPT_PARAM 	if one of the sessions has the 'encrypt' attribute set and the command does not support encryption of the first response parameter. 	
TSS2_RC Esys_NV_Write_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_NV_Write
This function returns the results of a TPM2_NV_Write command invoked via Esys_NV_Write_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_NV_WriteLock command.
Functions
TSS2_RC Esys_NV_WriteLock_Async (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR nvIndex, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_NV_WriteLock (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR nvIndex, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_NV_WriteLock_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_NV_WriteLock command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_NV_WriteLock (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  nvIndex, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
One-Call function for TPM2_NV_WriteLock
This function invokes the TPM2_NV_WriteLock command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	Handle indicating the source of the authorization value. 	
in	nvIndex 	The NV Index of the area to lock. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_NV_WriteLock_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  nvIndex, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
Asynchronous function for TPM2_NV_WriteLock
This function invokes the TPM2_NV_WriteLock 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_NV_WriteLock_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	Handle indicating the source of the authorization value. 	
in	nvIndex 	The NV Index of the area to lock. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	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. 	
TSS2_RC Esys_NV_WriteLock_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_NV_WriteLock
This function returns the results of a TPM2_NV_WriteLock command invoked via Esys_NV_WriteLock_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_ObjectChangeAuth command.
Functions
TSS2_RC Esys_ObjectChangeAuth_Async (ESYS_CONTEXT *esysContext, ESYS_TR objectHandle, ESYS_TR parentHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_AUTH *newAuth)
TSS2_RC Esys_ObjectChangeAuth (ESYS_CONTEXT *esysContext, ESYS_TR objectHandle, ESYS_TR parentHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_AUTH *newAuth, TPM2B_PRIVATE **outPrivate)
TSS2_RC Esys_ObjectChangeAuth_Finish (ESYS_CONTEXT *esysContext, TPM2B_PRIVATE **outPrivate)

Detailed Description
ESAPI function to invoke the TPM2_ObjectChangeAuth command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_ObjectChangeAuth (ESYS_CONTEXT *  esysContext, ESYS_TR  objectHandle, ESYS_TR  parentHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_AUTH *  newAuth, TPM2B_PRIVATE **  outPrivate)
One-Call function for TPM2_ObjectChangeAuth
This function invokes the TPM2_ObjectChangeAuth command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	objectHandle 	Handle of the object. 	
in	parentHandle 	Handle of the parent. 	
in	shandle1 	Session handle for authorization of objectHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	newAuth 	New authorization value. 	
out	outPrivate 	Private area containing the new authorization value. (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_ObjectChangeAuth_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  objectHandle, ESYS_TR  parentHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_AUTH *  newAuth)
Asynchronous function for TPM2_ObjectChangeAuth
This function invokes the TPM2_ObjectChangeAuth 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_ObjectChangeAuth_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	objectHandle 	Handle of the object. 	
in	parentHandle 	Handle of the parent. 	
in	shandle1 	Session handle for authorization of objectHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	newAuth 	New authorization value. 	
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_ObjectChangeAuth_Finish (ESYS_CONTEXT *  esysContext, TPM2B_PRIVATE **  outPrivate)
Asynchronous finish function for TPM2_ObjectChangeAuth
This function returns the results of a TPM2_ObjectChangeAuth command invoked via Esys_ObjectChangeAuth_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	outPrivate 	Private area containing the new authorization value. (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. 	

The ESAPI function for the TPM2_PCR_Allocate command.
Functions
TSS2_RC Esys_PCR_Allocate_Async (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPML_PCR_SELECTION *pcrAllocation)
TSS2_RC Esys_PCR_Allocate (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPML_PCR_SELECTION *pcrAllocation, TPMI_YES_NO *allocationSuccess, UINT32 *maxPCR, UINT32 *sizeNeeded, UINT32 *sizeAvailable)
TSS2_RC Esys_PCR_Allocate_Finish (ESYS_CONTEXT *esysContext, TPMI_YES_NO *allocationSuccess, UINT32 *maxPCR, UINT32 *sizeNeeded, UINT32 *sizeAvailable)

Detailed Description
ESAPI function to invoke the TPM2_PCR_Allocate command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_PCR_Allocate (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPML_PCR_SELECTION *  pcrAllocation, TPMI_YES_NO *  allocationSuccess, UINT32 *  maxPCR, UINT32 *  sizeNeeded, UINT32 *  sizeAvailable)
One-Call function for TPM2_PCR_Allocate
This function invokes the TPM2_PCR_Allocate command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	TPM2_RH_PLATFORM+{PP}. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	pcrAllocation 	The requested allocation. 	
out	allocationSuccess 	YES if the allocation succeeded. (callee-allocated) 	
out	maxPCR 	Maximum number of PCR that may be in a bank. (callee-allocated) 	
out	sizeNeeded 	Number of octets required to satisfy the request. (callee-allocated) 	
out	sizeAvailable 	Number of octets available. Computed before the allocation.. (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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_PCR_Allocate_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPML_PCR_SELECTION *  pcrAllocation)
Asynchronous function for TPM2_PCR_Allocate
This function invokes the TPM2_PCR_Allocate 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_PCR_Allocate_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	TPM2_RH_PLATFORM+{PP}. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	pcrAllocation 	The requested allocation. 	
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. 	
TSS2_RC Esys_PCR_Allocate_Finish (ESYS_CONTEXT *  esysContext, TPMI_YES_NO *  allocationSuccess, UINT32 *  maxPCR, UINT32 *  sizeNeeded, UINT32 *  sizeAvailable)
Asynchronous finish function for TPM2_PCR_Allocate
This function returns the results of a TPM2_PCR_Allocate command invoked via Esys_PCR_Allocate_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	allocationSuccess 	YES if the allocation succeeded. (callee-allocated) 	
out	maxPCR 	Maximum number of PCR that may be in a bank. (callee-allocated) 	
out	sizeNeeded 	Number of octets required to satisfy the request. (callee-allocated) 	
out	sizeAvailable 	Number of octets available. Computed before the allocation.. (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. 	

The ESAPI function for the TPM2_PCR_Event command.
Functions
TSS2_RC Esys_PCR_Event_Async (ESYS_CONTEXT *esysContext, ESYS_TR pcrHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_EVENT *eventData)
TSS2_RC Esys_PCR_Event (ESYS_CONTEXT *esysContext, ESYS_TR pcrHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_EVENT *eventData, TPML_DIGEST_VALUES **digests)
TSS2_RC Esys_PCR_Event_Finish (ESYS_CONTEXT *esysContext, TPML_DIGEST_VALUES **digests)

Detailed Description
ESAPI function to invoke the TPM2_PCR_Event command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_PCR_Event (ESYS_CONTEXT *  esysContext, ESYS_TR  pcrHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_EVENT *  eventData, TPML_DIGEST_VALUES **  digests)
One-Call function for TPM2_PCR_Event
This function invokes the TPM2_PCR_Event command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	pcrHandle 	Handle of the PCR. 	
in	shandle1 	Session handle for authorization of pcrHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	eventData 	Event data in sized buffer. 	
out	digests 	. (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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_PCR_Event_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  pcrHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_EVENT *  eventData)
Asynchronous function for TPM2_PCR_Event
This function invokes the TPM2_PCR_Event 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_PCR_Event_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	pcrHandle 	Handle of the PCR. 	
in	shandle1 	Session handle for authorization of pcrHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	eventData 	Event data in sized buffer. 	
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_ENCRYPT_PARAM 	if one of the sessions has the 'encrypt' attribute set and the command does not support encryption of the first response parameter. 	
TSS2_RC Esys_PCR_Event_Finish (ESYS_CONTEXT *  esysContext, TPML_DIGEST_VALUES **  digests)
Asynchronous finish function for TPM2_PCR_Event
This function returns the results of a TPM2_PCR_Event command invoked via Esys_PCR_Event_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	digests 	. (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. 	

The ESAPI function for the TPM2_PCR_Extend command.
Functions
TSS2_RC Esys_PCR_Extend_Async (ESYS_CONTEXT *esysContext, ESYS_TR pcrHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPML_DIGEST_VALUES *digests)
TSS2_RC Esys_PCR_Extend (ESYS_CONTEXT *esysContext, ESYS_TR pcrHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPML_DIGEST_VALUES *digests)
TSS2_RC Esys_PCR_Extend_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_PCR_Extend command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_PCR_Extend (ESYS_CONTEXT *  esysContext, ESYS_TR  pcrHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPML_DIGEST_VALUES *  digests)
One-Call function for TPM2_PCR_Extend
This function invokes the TPM2_PCR_Extend command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	pcrHandle 	Handle of the PCR. 	
in	shandle1 	Session handle for authorization of pcrHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	digests 	List of tagged digest values to be extended. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_PCR_Extend_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  pcrHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPML_DIGEST_VALUES *  digests)
Asynchronous function for TPM2_PCR_Extend
This function invokes the TPM2_PCR_Extend 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_PCR_Extend_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	pcrHandle 	Handle of the PCR. 	
in	shandle1 	Session handle for authorization of pcrHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	digests 	List of tagged digest values to be extended. 	
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. 	
TSS2_RC Esys_PCR_Extend_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_PCR_Extend
This function returns the results of a TPM2_PCR_Extend command invoked via Esys_PCR_Extend_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_PCR_Read command.
Functions
TSS2_RC Esys_PCR_Read_Async (ESYS_CONTEXT *esysContext, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPML_PCR_SELECTION *pcrSelectionIn)
TSS2_RC Esys_PCR_Read (ESYS_CONTEXT *esysContext, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPML_PCR_SELECTION *pcrSelectionIn, UINT32 *pcrUpdateCounter, TPML_PCR_SELECTION **pcrSelectionOut, TPML_DIGEST **pcrValues)
TSS2_RC Esys_PCR_Read_Finish (ESYS_CONTEXT *esysContext, UINT32 *pcrUpdateCounter, TPML_PCR_SELECTION **pcrSelectionOut, TPML_DIGEST **pcrValues)

Detailed Description
ESAPI function to invoke the TPM2_PCR_Read command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_PCR_Read (ESYS_CONTEXT *  esysContext, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPML_PCR_SELECTION *  pcrSelectionIn, UINT32 *  pcrUpdateCounter, TPML_PCR_SELECTION **  pcrSelectionOut, TPML_DIGEST **  pcrValues)
One-Call function for TPM2_PCR_Read
This function invokes the TPM2_PCR_Read command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	pcrSelectionIn 	The selection of PCR to read. 	
out	pcrUpdateCounter 	The current value of the PCR update counter. (callee-allocated) 	
out	pcrSelectionOut 	The PCR in the returned list. (callee-allocated) 	
out	pcrValues 	The contents of the PCR indicated in pcrSelectOut-> pcrSelection[] as tagged digests. (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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_PCR_Read_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPML_PCR_SELECTION *  pcrSelectionIn)
Asynchronous function for TPM2_PCR_Read
This function invokes the TPM2_PCR_Read 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_PCR_Read_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	pcrSelectionIn 	The selection of PCR to read. 	
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_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. 	
TSS2_RC Esys_PCR_Read_Finish (ESYS_CONTEXT *  esysContext, UINT32 *  pcrUpdateCounter, TPML_PCR_SELECTION **  pcrSelectionOut, TPML_DIGEST **  pcrValues)
Asynchronous finish function for TPM2_PCR_Read
This function returns the results of a TPM2_PCR_Read command invoked via Esys_PCR_Read_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	pcrUpdateCounter 	The current value of the PCR update counter. (callee-allocated) 	
out	pcrSelectionOut 	The PCR in the returned list. (callee-allocated) 	
out	pcrValues 	The contents of the PCR indicated in pcrSelectOut-> pcrSelection[] as tagged digests. (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. 	

The ESAPI function for the TPM2_PCR_Reset command.
Functions
TSS2_RC Esys_PCR_Reset_Async (ESYS_CONTEXT *esysContext, ESYS_TR pcrHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_PCR_Reset (ESYS_CONTEXT *esysContext, ESYS_TR pcrHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_PCR_Reset_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_PCR_Reset command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_PCR_Reset (ESYS_CONTEXT *  esysContext, ESYS_TR  pcrHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
One-Call function for TPM2_PCR_Reset
This function invokes the TPM2_PCR_Reset command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	pcrHandle 	The PCR to reset. 	
in	shandle1 	Session handle for authorization of pcrHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_PCR_Reset_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  pcrHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
Asynchronous function for TPM2_PCR_Reset
This function invokes the TPM2_PCR_Reset 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_PCR_Reset_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	pcrHandle 	The PCR to reset. 	
in	shandle1 	Session handle for authorization of pcrHandle 	
in	shandle2 	Second session handle. 	
in	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. 	
TSS2_RC Esys_PCR_Reset_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_PCR_Reset
This function returns the results of a TPM2_PCR_Reset command invoked via Esys_PCR_Reset_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_PCR_SetAuthPolicy command.
Functions
TSS2_RC Esys_PCR_SetAuthPolicy_Async (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DIGEST *authPolicy, TPMI_ALG_HASH hashAlg, TPMI_DH_PCR pcrNum)
TSS2_RC Esys_PCR_SetAuthPolicy (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DIGEST *authPolicy, TPMI_ALG_HASH hashAlg, TPMI_DH_PCR pcrNum)
TSS2_RC Esys_PCR_SetAuthPolicy_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_PCR_SetAuthPolicy command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_PCR_SetAuthPolicy (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DIGEST *  authPolicy, TPMI_ALG_HASH  hashAlg, TPMI_DH_PCR  pcrNum)
One-Call function for TPM2_PCR_SetAuthPolicy
This function invokes the TPM2_PCR_SetAuthPolicy command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	TPM2_RH_PLATFORM+{PP}. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	authPolicy 	The desired authPolicy. 	
in	hashAlg 	The hash algorithm of the policy. 	
in	pcrNum 	The PCR for which the policy is to be set. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_PCR_SetAuthPolicy_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DIGEST *  authPolicy, TPMI_ALG_HASH  hashAlg, TPMI_DH_PCR  pcrNum)
Asynchronous function for TPM2_PCR_SetAuthPolicy
This function invokes the TPM2_PCR_SetAuthPolicy 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_PCR_SetAuthPolicy_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	TPM2_RH_PLATFORM+{PP}. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	authPolicy 	The desired authPolicy. 	
in	hashAlg 	The hash algorithm of the policy. 	
in	pcrNum 	The PCR for which the policy is to be set. 	
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_ENCRYPT_PARAM 	if one of the sessions has the 'encrypt' attribute set and the command does not support encryption of the first response parameter. 	
TSS2_RC Esys_PCR_SetAuthPolicy_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_PCR_SetAuthPolicy
This function returns the results of a TPM2_PCR_SetAuthPolicy command invoked via Esys_PCR_SetAuthPolicy_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_PCR_SetAuthValue command.
Functions
TSS2_RC Esys_PCR_SetAuthValue_Async (ESYS_CONTEXT *esysContext, ESYS_TR pcrHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DIGEST *auth)
TSS2_RC Esys_PCR_SetAuthValue (ESYS_CONTEXT *esysContext, ESYS_TR pcrHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DIGEST *auth)
TSS2_RC Esys_PCR_SetAuthValue_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_PCR_SetAuthValue command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_PCR_SetAuthValue (ESYS_CONTEXT *  esysContext, ESYS_TR  pcrHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DIGEST *  auth)
One-Call function for TPM2_PCR_SetAuthValue
This function invokes the TPM2_PCR_SetAuthValue command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	pcrHandle 	Handle for a PCR that may have an authorization value set. 	
in	shandle1 	Session handle for authorization of pcrHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	auth 	The desired authorization value. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_PCR_SetAuthValue_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  pcrHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DIGEST *  auth)
Asynchronous function for TPM2_PCR_SetAuthValue
This function invokes the TPM2_PCR_SetAuthValue 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_PCR_SetAuthValue_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	pcrHandle 	Handle for a PCR that may have an authorization value set. 	
in	shandle1 	Session handle for authorization of pcrHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	auth 	The desired authorization value. 	
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_ENCRYPT_PARAM 	if one of the sessions has the 'encrypt' attribute set and the command does not support encryption of the first response parameter. 	
TSS2_RC Esys_PCR_SetAuthValue_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_PCR_SetAuthValue
This function returns the results of a TPM2_PCR_SetAuthValue command invoked via Esys_PCR_SetAuthValue_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_PolicyAuthorize command.
Functions
TSS2_RC Esys_PolicyAuthorize_Async (ESYS_CONTEXT *esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DIGEST *approvedPolicy, const TPM2B_NONCE *policyRef, const TPM2B_NAME *keySign, const TPMT_TK_VERIFIED *checkTicket)
TSS2_RC Esys_PolicyAuthorize (ESYS_CONTEXT *esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DIGEST *approvedPolicy, const TPM2B_NONCE *policyRef, const TPM2B_NAME *keySign, const TPMT_TK_VERIFIED *checkTicket)
TSS2_RC Esys_PolicyAuthorize_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_PolicyAuthorize command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_PolicyAuthorize (ESYS_CONTEXT *  esysContext, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DIGEST *  approvedPolicy, const TPM2B_NONCE *  policyRef, const TPM2B_NAME *  keySign, const TPMT_TK_VERIFIED *  checkTicket)
One-Call function for TPM2_PolicyAuthorize
This function invokes the TPM2_PolicyAuthorize command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	approvedPolicy 	Digest of the policy being approved. 	
in	policyRef 	A policy qualifier. 	
in	keySign 	Name of a key that can sign a policy addition. 	
in	checkTicket 	Ticket validating that approvedPolicy and policyRef were signed by keySign. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_PolicyAuthorize_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DIGEST *  approvedPolicy, const TPM2B_NONCE *  policyRef, const TPM2B_NAME *  keySign, const TPMT_TK_VERIFIED *  checkTicket)
Asynchronous function for TPM2_PolicyAuthorize
This function invokes the TPM2_PolicyAuthorize 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_PolicyAuthorize_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	approvedPolicy 	Digest of the policy being approved. 	
in	policyRef 	A policy qualifier. 	
in	keySign 	Name of a key that can sign a policy addition. 	
in	checkTicket 	Ticket validating that approvedPolicy and policyRef were signed by keySign. 	
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. 	
TSS2_RC Esys_PolicyAuthorize_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_PolicyAuthorize
This function returns the results of a TPM2_PolicyAuthorize command invoked via Esys_PolicyAuthorize_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_PolicyAuthValue command.
Functions
TSS2_RC Esys_PolicyAuthValue_Async (ESYS_CONTEXT *esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_PolicyAuthValue (ESYS_CONTEXT *esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_PolicyAuthValue_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_PolicyAuthValue command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_PolicyAuthValue (ESYS_CONTEXT *  esysContext, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
One-Call function for TPM2_PolicyAuthValue
This function invokes the TPM2_PolicyAuthValue command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_PolicyAuthValue_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
Asynchronous function for TPM2_PolicyAuthValue
This function invokes the TPM2_PolicyAuthValue 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_PolicyAuthValue_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	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. 	
TSS2_RC Esys_PolicyAuthValue_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_PolicyAuthValue
This function returns the results of a TPM2_PolicyAuthValue command invoked via Esys_PolicyAuthValue_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_PolicyCommandCode command.
Functions
TSS2_RC Esys_PolicyCommandCode_Async (ESYS_CONTEXT *esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPM2_CC code)
TSS2_RC Esys_PolicyCommandCode (ESYS_CONTEXT *esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPM2_CC code)
TSS2_RC Esys_PolicyCommandCode_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_PolicyCommandCode command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_PolicyCommandCode (ESYS_CONTEXT *  esysContext, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPM2_CC  code)
One-Call function for TPM2_PolicyCommandCode
This function invokes the TPM2_PolicyCommandCode command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	code 	The allowed commandCode. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_PolicyCommandCode_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPM2_CC  code)
Asynchronous function for TPM2_PolicyCommandCode
This function invokes the TPM2_PolicyCommandCode 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_PolicyCommandCode_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	code 	The allowed commandCode. 	
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. 	
TSS2_RC Esys_PolicyCommandCode_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_PolicyCommandCode
This function returns the results of a TPM2_PolicyCommandCode command invoked via Esys_PolicyCommandCode_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_PolicyCounterTimer command.
Functions
TSS2_RC Esys_PolicyCounterTimer_Async (ESYS_CONTEXT *esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_OPERAND *operandB, UINT16 offset, TPM2_EO operation)
TSS2_RC Esys_PolicyCounterTimer (ESYS_CONTEXT *esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_OPERAND *operandB, UINT16 offset, TPM2_EO operation)
TSS2_RC Esys_PolicyCounterTimer_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_PolicyCounterTimer command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_PolicyCounterTimer (ESYS_CONTEXT *  esysContext, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_OPERAND *  operandB, UINT16  offset, TPM2_EO  operation)
One-Call function for TPM2_PolicyCounterTimer
This function invokes the TPM2_PolicyCounterTimer command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	operandB 	The second operand. 	
in	offset 	The offset in TPMS_TIME_INFO structure for the start of operand A. 	
in	operation 	The comparison to make. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_PolicyCounterTimer_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_OPERAND *  operandB, UINT16  offset, TPM2_EO  operation)
Asynchronous function for TPM2_PolicyCounterTimer
This function invokes the TPM2_PolicyCounterTimer 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_PolicyCounterTimer_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	operandB 	The second operand. 	
in	offset 	The offset in TPMS_TIME_INFO structure for the start of operand A. 	
in	operation 	The comparison to make. 	
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_ENCRYPT_PARAM 	if one of the sessions has the 'encrypt' attribute set and the command does not support encryption of the first response parameter. 	
TSS2_RC Esys_PolicyCounterTimer_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_PolicyCounterTimer
This function returns the results of a TPM2_PolicyCounterTimer command invoked via Esys_PolicyCounterTimer_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_PolicyCpHash command.
Functions
TSS2_RC Esys_PolicyCpHash_Async (ESYS_CONTEXT *esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DIGEST *cpHashA)
TSS2_RC Esys_PolicyCpHash (ESYS_CONTEXT *esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DIGEST *cpHashA)
TSS2_RC Esys_PolicyCpHash_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_PolicyCpHash command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_PolicyCpHash (ESYS_CONTEXT *  esysContext, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DIGEST *  cpHashA)
One-Call function for TPM2_PolicyCpHash
This function invokes the TPM2_PolicyCpHash command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	cpHashA 	The cpHash added to the policy. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_PolicyCpHash_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DIGEST *  cpHashA)
Asynchronous function for TPM2_PolicyCpHash
This function invokes the TPM2_PolicyCpHash 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_PolicyCpHash_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	cpHashA 	The cpHash added to the policy. 	
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. 	
TSS2_RC Esys_PolicyCpHash_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_PolicyCpHash
This function returns the results of a TPM2_PolicyCpHash command invoked via Esys_PolicyCpHash_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_PolicyDuplicationSelect command.
Functions
TSS2_RC Esys_PolicyDuplicationSelect_Async (ESYS_CONTEXT *esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_NAME *objectName, const TPM2B_NAME *newParentName, TPMI_YES_NO includeObject)
TSS2_RC Esys_PolicyDuplicationSelect (ESYS_CONTEXT *esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_NAME *objectName, const TPM2B_NAME *newParentName, TPMI_YES_NO includeObject)
TSS2_RC Esys_PolicyDuplicationSelect_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_PolicyDuplicationSelect command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_PolicyDuplicationSelect (ESYS_CONTEXT *  esysContext, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_NAME *  objectName, const TPM2B_NAME *  newParentName, TPMI_YES_NO  includeObject)
One-Call function for TPM2_PolicyDuplicationSelect
This function invokes the TPM2_PolicyDuplicationSelect command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	objectName 	The Name of the object to be duplicated. 	
in	newParentName 	The Name of the new parent. 	
in	includeObject 	If YES, the objectName will be included in the value in policySession->policyDigest. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_PolicyDuplicationSelect_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_NAME *  objectName, const TPM2B_NAME *  newParentName, TPMI_YES_NO  includeObject)
Asynchronous function for TPM2_PolicyDuplicationSelect
This function invokes the TPM2_PolicyDuplicationSelect 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_PolicyDuplicationSelect_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	objectName 	The Name of the object to be duplicated. 	
in	newParentName 	The Name of the new parent. 	
in	includeObject 	If YES, the objectName will be included in the value in policySession->policyDigest. 	
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. 	
TSS2_RC Esys_PolicyDuplicationSelect_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_PolicyDuplicationSelect
This function returns the results of a TPM2_PolicyDuplicationSelect command invoked via Esys_PolicyDuplicationSelect_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_PolicyGetDigest command.
Functions
TSS2_RC Esys_PolicyGetDigest_Async (ESYS_CONTEXT *esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_PolicyGetDigest (ESYS_CONTEXT *esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPM2B_DIGEST **policyDigest)
TSS2_RC Esys_PolicyGetDigest_Finish (ESYS_CONTEXT *esysContext, TPM2B_DIGEST **policyDigest)

Detailed Description
ESAPI function to invoke the TPM2_PolicyGetDigest command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_PolicyGetDigest (ESYS_CONTEXT *  esysContext, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPM2B_DIGEST **  policyDigest)
One-Call function for TPM2_PolicyGetDigest
This function invokes the TPM2_PolicyGetDigest command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	policySession 	Handle for the policy session. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
out	policyDigest 	The current value of the policySession->policyDigest. (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_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_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_PolicyGetDigest_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
Asynchronous function for TPM2_PolicyGetDigest
This function invokes the TPM2_PolicyGetDigest 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_PolicyGetDigest_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	policySession 	Handle for the policy session. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	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_RC Esys_PolicyGetDigest_Finish (ESYS_CONTEXT *  esysContext, TPM2B_DIGEST **  policyDigest)
Asynchronous finish function for TPM2_PolicyGetDigest
This function returns the results of a TPM2_PolicyGetDigest command invoked via Esys_PolicyGetDigest_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	policyDigest 	The current value of the policySession->policyDigest. (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. 	

The ESAPI function for the TPM2_PolicyLocality command.
Functions
TSS2_RC Esys_PolicyLocality_Async (ESYS_CONTEXT *esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPMA_LOCALITY locality)
TSS2_RC Esys_PolicyLocality (ESYS_CONTEXT *esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPMA_LOCALITY locality)
TSS2_RC Esys_PolicyLocality_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_PolicyLocality command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_PolicyLocality (ESYS_CONTEXT *  esysContext, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPMA_LOCALITY  locality)
One-Call function for TPM2_PolicyLocality
This function invokes the TPM2_PolicyLocality command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	locality 	The allowed localities for the policy. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_PolicyLocality_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPMA_LOCALITY  locality)
Asynchronous function for TPM2_PolicyLocality
This function invokes the TPM2_PolicyLocality 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_PolicyLocality_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	locality 	The allowed localities for the policy. 	
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. 	
TSS2_RC Esys_PolicyLocality_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_PolicyLocality
This function returns the results of a TPM2_PolicyLocality command invoked via Esys_PolicyLocality_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_PolicyNameHash command.
Functions
TSS2_RC Esys_PolicyNameHash_Async (ESYS_CONTEXT *esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DIGEST *nameHash)
TSS2_RC Esys_PolicyNameHash (ESYS_CONTEXT *esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DIGEST *nameHash)
TSS2_RC Esys_PolicyNameHash_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_PolicyNameHash command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_PolicyNameHash (ESYS_CONTEXT *  esysContext, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DIGEST *  nameHash)
One-Call function for TPM2_PolicyNameHash
This function invokes the TPM2_PolicyNameHash command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	nameHash 	The digest to be added to the policy. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_PolicyNameHash_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DIGEST *  nameHash)
Asynchronous function for TPM2_PolicyNameHash
This function invokes the TPM2_PolicyNameHash 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_PolicyNameHash_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	nameHash 	The digest to be added to the policy. 	
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. 	
TSS2_RC Esys_PolicyNameHash_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_PolicyNameHash
This function returns the results of a TPM2_PolicyNameHash command invoked via Esys_PolicyNameHash_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_PolicyNV command.
Functions
TSS2_RC Esys_PolicyNV_Async (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR nvIndex, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_OPERAND *operandB, UINT16 offset, TPM2_EO operation)
TSS2_RC Esys_PolicyNV (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR nvIndex, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_OPERAND *operandB, UINT16 offset, TPM2_EO operation)
TSS2_RC Esys_PolicyNV_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_PolicyNV command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_PolicyNV (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  nvIndex, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_OPERAND *  operandB, UINT16  offset, TPM2_EO  operation)
One-Call function for TPM2_PolicyNV
This function invokes the TPM2_PolicyNV command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	Handle indicating the source of the authorization value. 	
in	nvIndex 	The NV Index of the area to read. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	operandB 	The second operand. 	
in	offset 	The offset in the NV Index for the start of operand A. 	
in	operation 	The comparison to make. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_PolicyNV_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  nvIndex, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_OPERAND *  operandB, UINT16  offset, TPM2_EO  operation)
Asynchronous function for TPM2_PolicyNV
This function invokes the TPM2_PolicyNV 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_PolicyNV_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	Handle indicating the source of the authorization value. 	
in	nvIndex 	The NV Index of the area to read. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	operandB 	The second operand. 	
in	offset 	The offset in the NV Index for the start of operand A. 	
in	operation 	The comparison to make. 	
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_ENCRYPT_PARAM 	if one of the sessions has the 'encrypt' attribute set and the command does not support encryption of the first response parameter. 	
TSS2_RC Esys_PolicyNV_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_PolicyNV
This function returns the results of a TPM2_PolicyNV command invoked via Esys_PolicyNV_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_PolicyNvWritten command.
Functions
TSS2_RC Esys_PolicyNvWritten_Async (ESYS_CONTEXT *esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPMI_YES_NO writtenSet)
TSS2_RC Esys_PolicyNvWritten (ESYS_CONTEXT *esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPMI_YES_NO writtenSet)
TSS2_RC Esys_PolicyNvWritten_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_PolicyNvWritten command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_PolicyNvWritten (ESYS_CONTEXT *  esysContext, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPMI_YES_NO  writtenSet)
One-Call function for TPM2_PolicyNvWritten
This function invokes the TPM2_PolicyNvWritten command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	writtenSet 	YES if NV Index is required to have been written. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_PolicyNvWritten_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPMI_YES_NO  writtenSet)
Asynchronous function for TPM2_PolicyNvWritten
This function invokes the TPM2_PolicyNvWritten 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_PolicyNvWritten_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	writtenSet 	YES if NV Index is required to have been written. 	
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. 	
TSS2_RC Esys_PolicyNvWritten_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_PolicyNvWritten
This function returns the results of a TPM2_PolicyNvWritten command invoked via Esys_PolicyNvWritten_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_PolicyOR command.
Functions
TSS2_RC Esys_PolicyOR_Async (ESYS_CONTEXT *esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPML_DIGEST *pHashList)
TSS2_RC Esys_PolicyOR (ESYS_CONTEXT *esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPML_DIGEST *pHashList)
TSS2_RC Esys_PolicyOR_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_PolicyOR command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_PolicyOR (ESYS_CONTEXT *  esysContext, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPML_DIGEST *  pHashList)
One-Call function for TPM2_PolicyOR
This function invokes the TPM2_PolicyOR command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	pHashList 	The list of hashes to check for a match. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_PolicyOR_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPML_DIGEST *  pHashList)
Asynchronous function for TPM2_PolicyOR
This function invokes the TPM2_PolicyOR 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_PolicyOR_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	pHashList 	The list of hashes to check for a match. 	
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. 	
TSS2_RC Esys_PolicyOR_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_PolicyOR
This function returns the results of a TPM2_PolicyOR command invoked via Esys_PolicyOR_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_PolicyPassword command.
Functions
TSS2_RC Esys_PolicyPassword_Async (ESYS_CONTEXT *esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_PolicyPassword (ESYS_CONTEXT *esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_PolicyPassword_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_PolicyPassword command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_PolicyPassword (ESYS_CONTEXT *  esysContext, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
One-Call function for TPM2_PolicyPassword
This function invokes the TPM2_PolicyPassword command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_PolicyPassword_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
Asynchronous function for TPM2_PolicyPassword
This function invokes the TPM2_PolicyPassword 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_PolicyPassword_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	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. 	
TSS2_RC Esys_PolicyPassword_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_PolicyPassword
This function returns the results of a TPM2_PolicyPassword command invoked via Esys_PolicyPassword_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_PolicyPCR command.
Functions
TSS2_RC Esys_PolicyPCR_Async (ESYS_CONTEXT *esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DIGEST *pcrDigest, const TPML_PCR_SELECTION *pcrs)
TSS2_RC Esys_PolicyPCR (ESYS_CONTEXT *esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DIGEST *pcrDigest, const TPML_PCR_SELECTION *pcrs)
TSS2_RC Esys_PolicyPCR_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_PolicyPCR command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_PolicyPCR (ESYS_CONTEXT *  esysContext, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DIGEST *  pcrDigest, const TPML_PCR_SELECTION *  pcrs)
One-Call function for TPM2_PolicyPCR
This function invokes the TPM2_PolicyPCR command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	pcrDigest 	Expected digest value of the selected PCR using the hash algorithm of the session; may be zero length. 	
in	pcrs 	The PCR to include in the check digest. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_PolicyPCR_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DIGEST *  pcrDigest, const TPML_PCR_SELECTION *  pcrs)
Asynchronous function for TPM2_PolicyPCR
This function invokes the TPM2_PolicyPCR 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_PolicyPCR_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	pcrDigest 	Expected digest value of the selected PCR using the hash algorithm of the session; may be zero length. 	
in	pcrs 	The PCR to include in the check digest. 	
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_ENCRYPT_PARAM 	if one of the sessions has the 'encrypt' attribute set and the command does not support encryption of the first response parameter. 	
TSS2_RC Esys_PolicyPCR_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_PolicyPCR
This function returns the results of a TPM2_PolicyPCR command invoked via Esys_PolicyPCR_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_PolicyPhysicalPresence command.
Functions
TSS2_RC Esys_PolicyPhysicalPresence_Async (ESYS_CONTEXT *esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_PolicyPhysicalPresence (ESYS_CONTEXT *esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_PolicyPhysicalPresence_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_PolicyPhysicalPresence command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_PolicyPhysicalPresence (ESYS_CONTEXT *  esysContext, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
One-Call function for TPM2_PolicyPhysicalPresence
This function invokes the TPM2_PolicyPhysicalPresence command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_PolicyPhysicalPresence_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
Asynchronous function for TPM2_PolicyPhysicalPresence
This function invokes the TPM2_PolicyPhysicalPresence 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_PolicyPhysicalPresence_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	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. 	
TSS2_RC Esys_PolicyPhysicalPresence_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_PolicyPhysicalPresence
This function returns the results of a TPM2_PolicyPhysicalPresence command invoked via Esys_PolicyPhysicalPresence_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_PolicyRestart command.
Functions
TSS2_RC Esys_PolicyRestart_Async (ESYS_CONTEXT *esysContext, ESYS_TR sessionHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_PolicyRestart (ESYS_CONTEXT *esysContext, ESYS_TR sessionHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_PolicyRestart_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_PolicyRestart command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_PolicyRestart (ESYS_CONTEXT *  esysContext, ESYS_TR  sessionHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
One-Call function for TPM2_PolicyRestart
This function invokes the TPM2_PolicyRestart command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	sessionHandle 	The handle for the policy session. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_PolicyRestart_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  sessionHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
Asynchronous function for TPM2_PolicyRestart
This function invokes the TPM2_PolicyRestart 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_PolicyRestart_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	sessionHandle 	The handle for the policy session. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	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. 	
TSS2_RC Esys_PolicyRestart_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_PolicyRestart
This function returns the results of a TPM2_PolicyRestart command invoked via Esys_PolicyRestart_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_PolicySecret command.
Functions
TSS2_RC Esys_PolicySecret_Async (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_NONCE *nonceTPM, const TPM2B_DIGEST *cpHashA, const TPM2B_NONCE *policyRef, INT32 expiration)
TSS2_RC Esys_PolicySecret (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_NONCE *nonceTPM, const TPM2B_DIGEST *cpHashA, const TPM2B_NONCE *policyRef, INT32 expiration, TPM2B_TIMEOUT **timeout, TPMT_TK_AUTH **policyTicket)
TSS2_RC Esys_PolicySecret_Finish (ESYS_CONTEXT *esysContext, TPM2B_TIMEOUT **timeout, TPMT_TK_AUTH **policyTicket)

Detailed Description
ESAPI function to invoke the TPM2_PolicySecret command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_PolicySecret (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_NONCE *  nonceTPM, const TPM2B_DIGEST *  cpHashA, const TPM2B_NONCE *  policyRef, INT32  expiration, TPM2B_TIMEOUT **  timeout, TPMT_TK_AUTH **  policyTicket)
One-Call function for TPM2_PolicySecret
This function invokes the TPM2_PolicySecret command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	Handle for an entity providing the authorization. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	nonceTPM 	The policy nonce for the session. 	
in	cpHashA 	Digest of the command parameters to which this authorization is limited. 	
in	policyRef 	A reference to a policy relating to the authorization
may be the Empty Buffer. 
	
in	expiration 	Time when authorization will expire, measured in seconds from the time that nonceTPM was generated. 	
out	timeout 	Implementation-specific time value used to indicate to the TPM when the ticket expires; this ticket will use the TPMT_ST_AUTH_SECRET structure tag. (callee-allocated) 	
out	policyTicket 	Produced if the command succeeds and expiration in the command was non-zero ( See 23.2.5). (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_PolicySecret_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_NONCE *  nonceTPM, const TPM2B_DIGEST *  cpHashA, const TPM2B_NONCE *  policyRef, INT32  expiration)
Asynchronous function for TPM2_PolicySecret
This function invokes the TPM2_PolicySecret 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_PolicySecret_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	Handle for an entity providing the authorization. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	nonceTPM 	The policy nonce for the session. 	
in	cpHashA 	Digest of the command parameters to which this authorization is limited. 	
in	policyRef 	A reference to a policy relating to the authorization
may be the Empty Buffer. 
	
in	expiration 	Time when authorization will expire, measured in seconds from the time that nonceTPM was generated. 	
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_PolicySecret_Finish (ESYS_CONTEXT *  esysContext, TPM2B_TIMEOUT **  timeout, TPMT_TK_AUTH **  policyTicket)
Asynchronous finish function for TPM2_PolicySecret
This function returns the results of a TPM2_PolicySecret command invoked via Esys_PolicySecret_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	timeout 	Implementation-specific time value used to indicate to the TPM when the ticket expires; this ticket will use the TPMT_ST_AUTH_SECRET structure tag. (callee-allocated) 	
out	policyTicket 	Produced if the command succeeds and expiration in the command was non-zero ( See 23.2.5). (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. 	

The ESAPI function for the TPM2_PolicySigned command.
Functions
TSS2_RC Esys_PolicySigned_Async (ESYS_CONTEXT *esysContext, ESYS_TR authObject, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_NONCE *nonceTPM, const TPM2B_DIGEST *cpHashA, const TPM2B_NONCE *policyRef, INT32 expiration, const TPMT_SIGNATURE *auth)
TSS2_RC Esys_PolicySigned (ESYS_CONTEXT *esysContext, ESYS_TR authObject, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_NONCE *nonceTPM, const TPM2B_DIGEST *cpHashA, const TPM2B_NONCE *policyRef, INT32 expiration, const TPMT_SIGNATURE *auth, TPM2B_TIMEOUT **timeout, TPMT_TK_AUTH **policyTicket)
TSS2_RC Esys_PolicySigned_Finish (ESYS_CONTEXT *esysContext, TPM2B_TIMEOUT **timeout, TPMT_TK_AUTH **policyTicket)

Detailed Description
ESAPI function to invoke the TPM2_PolicySigned command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_PolicySigned (ESYS_CONTEXT *  esysContext, ESYS_TR  authObject, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_NONCE *  nonceTPM, const TPM2B_DIGEST *  cpHashA, const TPM2B_NONCE *  policyRef, INT32  expiration, const TPMT_SIGNATURE *  auth, TPM2B_TIMEOUT **  timeout, TPMT_TK_AUTH **  policyTicket)
One-Call function for TPM2_PolicySigned
This function invokes the TPM2_PolicySigned command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authObject 	Handle for a key that will validate the signature. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	nonceTPM 	The policy nonce for the session. 	
in	cpHashA 	Digest of the command parameters to which this authorization is limited. 	
in	policyRef 	A reference to a policy relating to the authorization
may be the Empty Buffer. 
	
in	expiration 	Time when authorization will expire, measured in seconds from the time that nonceTPM was generated. 	
in	auth 	Signed authorization (not optional). 	
out	timeout 	Implementation-specific time value, used to indicate to the TPM when the ticket expires. (callee-allocated) 	
out	policyTicket 	Produced if the command succeeds and expiration in the command was non-zero; this ticket will use the TPMT_ST_AUTH_SIGNED structure tag. See 23.2.5. (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_PolicySigned_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  authObject, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_NONCE *  nonceTPM, const TPM2B_DIGEST *  cpHashA, const TPM2B_NONCE *  policyRef, INT32  expiration, const TPMT_SIGNATURE *  auth)
Asynchronous function for TPM2_PolicySigned
This function invokes the TPM2_PolicySigned 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_PolicySigned_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authObject 	Handle for a key that will validate the signature. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	nonceTPM 	The policy nonce for the session. 	
in	cpHashA 	Digest of the command parameters to which this authorization is limited. 	
in	policyRef 	A reference to a policy relating to the authorization
may be the Empty Buffer. 
	
in	expiration 	Time when authorization will expire, measured in seconds from the time that nonceTPM was generated. 	
in	auth 	Signed authorization (not optional). 	
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_PolicySigned_Finish (ESYS_CONTEXT *  esysContext, TPM2B_TIMEOUT **  timeout, TPMT_TK_AUTH **  policyTicket)
Asynchronous finish function for TPM2_PolicySigned
This function returns the results of a TPM2_PolicySigned command invoked via Esys_PolicySigned_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	timeout 	Implementation-specific time value, used to indicate to the TPM when the ticket expires. (callee-allocated) 	
out	policyTicket 	Produced if the command succeeds and expiration in the command was non-zero; this ticket will use the TPMT_ST_AUTH_SIGNED structure tag. See 23.2.5. (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. 	

The ESAPI function for the TPM2_PolicyTicket command.
Functions
TSS2_RC Esys_PolicyTicket_Async (ESYS_CONTEXT *esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_TIMEOUT *timeout, const TPM2B_DIGEST *cpHashA, const TPM2B_NONCE *policyRef, const TPM2B_NAME *authName, const TPMT_TK_AUTH *ticket)
TSS2_RC Esys_PolicyTicket (ESYS_CONTEXT *esysContext, ESYS_TR policySession, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_TIMEOUT *timeout, const TPM2B_DIGEST *cpHashA, const TPM2B_NONCE *policyRef, const TPM2B_NAME *authName, const TPMT_TK_AUTH *ticket)
TSS2_RC Esys_PolicyTicket_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_PolicyTicket command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_PolicyTicket (ESYS_CONTEXT *  esysContext, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_TIMEOUT *  timeout, const TPM2B_DIGEST *  cpHashA, const TPM2B_NONCE *  policyRef, const TPM2B_NAME *  authName, const TPMT_TK_AUTH *  ticket)
One-Call function for TPM2_PolicyTicket
This function invokes the TPM2_PolicyTicket command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	timeout 	Time when authorization will expire. 	
in	cpHashA 	Digest of the command parameters to which this authorization is limited. 	
in	policyRef 	Reference to a qualifier for the policy - may be the Empty Buffer. 	
in	authName 	Name of the object that provided the authorization. 	
in	ticket 	An authorization ticket returned by the TPM in response to a TPM2_PolicySigned() or TPM2_PolicySecret(). 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_PolicyTicket_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  policySession, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_TIMEOUT *  timeout, const TPM2B_DIGEST *  cpHashA, const TPM2B_NONCE *  policyRef, const TPM2B_NAME *  authName, const TPMT_TK_AUTH *  ticket)
Asynchronous function for TPM2_PolicyTicket
This function invokes the TPM2_PolicyTicket 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_PolicyTicket_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	policySession 	Handle for the policy session being extended. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	timeout 	Time when authorization will expire. 	
in	cpHashA 	Digest of the command parameters to which this authorization is limited. 	
in	policyRef 	Reference to a qualifier for the policy - may be the Empty Buffer. 	
in	authName 	Name of the object that provided the authorization. 	
in	ticket 	An authorization ticket returned by the TPM in response to a TPM2_PolicySigned() or TPM2_PolicySecret(). 	
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_ENCRYPT_PARAM 	if one of the sessions has the 'encrypt' attribute set and the command does not support encryption of the first response parameter. 	
TSS2_RC Esys_PolicyTicket_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_PolicyTicket
This function returns the results of a TPM2_PolicyTicket command invoked via Esys_PolicyTicket_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_PP_Commands command.
Functions
TSS2_RC Esys_PP_Commands_Async (ESYS_CONTEXT *esysContext, ESYS_TR auth, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPML_CC *setList, const TPML_CC *clearList)
TSS2_RC Esys_PP_Commands (ESYS_CONTEXT *esysContext, ESYS_TR auth, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPML_CC *setList, const TPML_CC *clearList)
TSS2_RC Esys_PP_Commands_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_PP_Commands command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_PP_Commands (ESYS_CONTEXT *  esysContext, ESYS_TR  auth, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPML_CC *  setList, const TPML_CC *  clearList)
One-Call function for TPM2_PP_Commands
This function invokes the TPM2_PP_Commands command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	auth 	TPM2_RH_PLATFORM+TPM2_PP. 	
in	shandle1 	Session handle for authorization of auth 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	setList 	List of commands to be added to those that will require that Physical Presence be asserted. 	
in	clearList 	List of commands that will no longer require that Physical Presence be asserted. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_PP_Commands_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  auth, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPML_CC *  setList, const TPML_CC *  clearList)
Asynchronous function for TPM2_PP_Commands
This function invokes the TPM2_PP_Commands 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_PP_Commands_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	auth 	TPM2_RH_PLATFORM+TPM2_PP. 	
in	shandle1 	Session handle for authorization of auth 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	setList 	List of commands to be added to those that will require that Physical Presence be asserted. 	
in	clearList 	List of commands that will no longer require that Physical Presence be asserted. 	
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. 	
TSS2_RC Esys_PP_Commands_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_PP_Commands
This function returns the results of a TPM2_PP_Commands command invoked via Esys_PP_Commands_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_Quote command.
Functions
TSS2_RC Esys_Quote_Async (ESYS_CONTEXT *esysContext, ESYS_TR signHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DATA *qualifyingData, const TPMT_SIG_SCHEME *inScheme, const TPML_PCR_SELECTION *PCRselect)
TSS2_RC Esys_Quote (ESYS_CONTEXT *esysContext, ESYS_TR signHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DATA *qualifyingData, const TPMT_SIG_SCHEME *inScheme, const TPML_PCR_SELECTION *PCRselect, TPM2B_ATTEST **quoted, TPMT_SIGNATURE **signature)
TSS2_RC Esys_Quote_Finish (ESYS_CONTEXT *esysContext, TPM2B_ATTEST **quoted, TPMT_SIGNATURE **signature)

Detailed Description
ESAPI function to invoke the TPM2_Quote command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_Quote (ESYS_CONTEXT *  esysContext, ESYS_TR  signHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DATA *  qualifyingData, const TPMT_SIG_SCHEME *  inScheme, const TPML_PCR_SELECTION *  PCRselect, TPM2B_ATTEST **  quoted, TPMT_SIGNATURE **  signature)
One-Call function for TPM2_Quote
This function invokes the TPM2_Quote command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	signHandle 	Handle of key that will perform signature. 	
in	shandle1 	Session handle for authorization of signHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	qualifyingData 	Data supplied by the caller. 	
in	inScheme 	TPM2_Signing scheme to use if the scheme for signHandle is TPM2_ALG_NULL. 	
in	PCRselect 	PCR set to quote. 	
out	quoted 	The quoted information. (callee-allocated) 	
out	signature 	The signature over quoted . (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_Quote_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  signHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DATA *  qualifyingData, const TPMT_SIG_SCHEME *  inScheme, const TPML_PCR_SELECTION *  PCRselect)
Asynchronous function for TPM2_Quote
This function invokes the TPM2_Quote 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_Quote_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	signHandle 	Handle of key that will perform signature. 	
in	shandle1 	Session handle for authorization of signHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	qualifyingData 	Data supplied by the caller. 	
in	inScheme 	TPM2_Signing scheme to use if the scheme for signHandle is TPM2_ALG_NULL. 	
in	PCRselect 	PCR set to quote. 	
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_Quote_Finish (ESYS_CONTEXT *  esysContext, TPM2B_ATTEST **  quoted, TPMT_SIGNATURE **  signature)
Asynchronous finish function for TPM2_Quote
This function returns the results of a TPM2_Quote command invoked via Esys_Quote_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	quoted 	The quoted information. (callee-allocated) 	
out	signature 	The signature over quoted . (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. 	

The ESAPI function for the TPM2_ReadClock command.
Functions
TSS2_RC Esys_ReadClock_Async (ESYS_CONTEXT *esysContext, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_ReadClock (ESYS_CONTEXT *esysContext, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPMS_TIME_INFO **currentTime)
TSS2_RC Esys_ReadClock_Finish (ESYS_CONTEXT *esysContext, TPMS_TIME_INFO **currentTime)

Detailed Description
ESAPI function to invoke the TPM2_ReadClock command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_ReadClock (ESYS_CONTEXT *  esysContext, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPMS_TIME_INFO **  currentTime)
One-Call function for TPM2_ReadClock
This function invokes the TPM2_ReadClock command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
out	currentTime 	. (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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_ReadClock_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
Asynchronous function for TPM2_ReadClock
This function invokes the TPM2_ReadClock 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_ReadClock_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	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_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. 	
TSS2_RC Esys_ReadClock_Finish (ESYS_CONTEXT *  esysContext, TPMS_TIME_INFO **  currentTime)
Asynchronous finish function for TPM2_ReadClock
This function returns the results of a TPM2_ReadClock command invoked via Esys_ReadClock_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	currentTime 	. (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. 	

The ESAPI function for the TPM2_ReadPublic command.
Functions
TSS2_RC Esys_ReadPublic_Async (ESYS_CONTEXT *esysContext, ESYS_TR objectHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_ReadPublic (ESYS_CONTEXT *esysContext, ESYS_TR objectHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPM2B_PUBLIC **outPublic, TPM2B_NAME **name, TPM2B_NAME **qualifiedName)
TSS2_RC Esys_ReadPublic_Finish (ESYS_CONTEXT *esysContext, TPM2B_PUBLIC **outPublic, TPM2B_NAME **name, TPM2B_NAME **qualifiedName)

Detailed Description
ESAPI function to invoke the TPM2_ReadPublic command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_ReadPublic (ESYS_CONTEXT *  esysContext, ESYS_TR  objectHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPM2B_PUBLIC **  outPublic, TPM2B_NAME **  name, TPM2B_NAME **  qualifiedName)
One-Call function for TPM2_ReadPublic
This function invokes the TPM2_ReadPublic command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	objectHandle 	TPM handle of an object. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
out	outPublic 	Structure containing the public area of an object. (callee-allocated) 	
out	name 	Name of the object. (callee-allocated) 	
out	qualifiedName 	The Qualified Name of the object. (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_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_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_ReadPublic_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  objectHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
Asynchronous function for TPM2_ReadPublic
This function invokes the TPM2_ReadPublic 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_ReadPublic_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	objectHandle 	TPM handle of an object. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	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_RC Esys_ReadPublic_Finish (ESYS_CONTEXT *  esysContext, TPM2B_PUBLIC **  outPublic, TPM2B_NAME **  name, TPM2B_NAME **  qualifiedName)
Asynchronous finish function for TPM2_ReadPublic
This function returns the results of a TPM2_ReadPublic command invoked via Esys_ReadPublic_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	outPublic 	Structure containing the public area of an object. (callee-allocated) 	
out	name 	Name of the object. (callee-allocated) 	
out	qualifiedName 	The Qualified Name of the object. (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. 	

The ESAPI function for the TPM2_Rewrap command.
Functions
TSS2_RC Esys_Rewrap_Async (ESYS_CONTEXT *esysContext, ESYS_TR oldParent, ESYS_TR newParent, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_PRIVATE *inDuplicate, const TPM2B_NAME *name, const TPM2B_ENCRYPTED_SECRET *inSymSeed)
TSS2_RC Esys_Rewrap (ESYS_CONTEXT *esysContext, ESYS_TR oldParent, ESYS_TR newParent, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_PRIVATE *inDuplicate, const TPM2B_NAME *name, const TPM2B_ENCRYPTED_SECRET *inSymSeed, TPM2B_PRIVATE **outDuplicate, TPM2B_ENCRYPTED_SECRET **outSymSeed)
TSS2_RC Esys_Rewrap_Finish (ESYS_CONTEXT *esysContext, TPM2B_PRIVATE **outDuplicate, TPM2B_ENCRYPTED_SECRET **outSymSeed)

Detailed Description
ESAPI function to invoke the TPM2_Rewrap command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_Rewrap (ESYS_CONTEXT *  esysContext, ESYS_TR  oldParent, ESYS_TR  newParent, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_PRIVATE *  inDuplicate, const TPM2B_NAME *  name, const TPM2B_ENCRYPTED_SECRET *  inSymSeed, TPM2B_PRIVATE **  outDuplicate, TPM2B_ENCRYPTED_SECRET **  outSymSeed)
One-Call function for TPM2_Rewrap
This function invokes the TPM2_Rewrap command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	oldParent 	Parent of object. 	
in	newParent 	New parent of the object. 	
in	shandle1 	Session handle for authorization of oldParent 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	inDuplicate 	An object encrypted using symmetric key derived from inSymSeed. 	
in	name 	The Name of the object being rewrapped. 	
in	inSymSeed 	The seed for the symmetric key and HMAC key. 	
out	outDuplicate 	An object encrypted using symmetric key derived from outSymSeed. (callee-allocated) 	
out	outSymSeed 	Seed for a symmetric key protected by newParent asymmetric key. (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_Rewrap_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  oldParent, ESYS_TR  newParent, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_PRIVATE *  inDuplicate, const TPM2B_NAME *  name, const TPM2B_ENCRYPTED_SECRET *  inSymSeed)
Asynchronous function for TPM2_Rewrap
This function invokes the TPM2_Rewrap 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_Rewrap_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	oldParent 	Parent of object. 	
in	newParent 	New parent of the object. 	
in	shandle1 	Session handle for authorization of oldParent 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	inDuplicate 	An object encrypted using symmetric key derived from inSymSeed. 	
in	name 	The Name of the object being rewrapped. 	
in	inSymSeed 	The seed for the symmetric key and HMAC key. 	
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_Rewrap_Finish (ESYS_CONTEXT *  esysContext, TPM2B_PRIVATE **  outDuplicate, TPM2B_ENCRYPTED_SECRET **  outSymSeed)
Asynchronous finish function for TPM2_Rewrap
This function returns the results of a TPM2_Rewrap command invoked via Esys_Rewrap_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	outDuplicate 	An object encrypted using symmetric key derived from outSymSeed. (callee-allocated) 	
out	outSymSeed 	Seed for a symmetric key protected by newParent asymmetric key. (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. 	

The ESAPI function for the TPM2_RSA_Decrypt command.
Functions
TSS2_RC Esys_RSA_Decrypt_Async (ESYS_CONTEXT *esysContext, ESYS_TR keyHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_PUBLIC_KEY_RSA *cipherText, const TPMT_RSA_DECRYPT *inScheme, const TPM2B_DATA *label)
TSS2_RC Esys_RSA_Decrypt (ESYS_CONTEXT *esysContext, ESYS_TR keyHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_PUBLIC_KEY_RSA *cipherText, const TPMT_RSA_DECRYPT *inScheme, const TPM2B_DATA *label, TPM2B_PUBLIC_KEY_RSA **message)
TSS2_RC Esys_RSA_Decrypt_Finish (ESYS_CONTEXT *esysContext, TPM2B_PUBLIC_KEY_RSA **message)

Detailed Description
ESAPI function to invoke the TPM2_RSA_Decrypt command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_RSA_Decrypt (ESYS_CONTEXT *  esysContext, ESYS_TR  keyHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_PUBLIC_KEY_RSA *  cipherText, const TPMT_RSA_DECRYPT *  inScheme, const TPM2B_DATA *  label, TPM2B_PUBLIC_KEY_RSA **  message)
One-Call function for TPM2_RSA_Decrypt
This function invokes the TPM2_RSA_Decrypt command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	keyHandle 	RSA key to use for decryption. 	
in	shandle1 	Session handle for authorization of keyHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	cipherText 	Cipher text to be decrypted. 	
in	inScheme 	TPM2_The padding scheme to use if scheme associated with keyHandle is TPM2_ALG_NULL. 	
in	label 	Label whose association with the message is to be verified. 	
out	message 	Decrypted output. (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_RSA_Decrypt_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  keyHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_PUBLIC_KEY_RSA *  cipherText, const TPMT_RSA_DECRYPT *  inScheme, const TPM2B_DATA *  label)
Asynchronous function for TPM2_RSA_Decrypt
This function invokes the TPM2_RSA_Decrypt 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_RSA_Decrypt_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	keyHandle 	RSA key to use for decryption. 	
in	shandle1 	Session handle for authorization of keyHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	cipherText 	Cipher text to be decrypted. 	
in	inScheme 	TPM2_The padding scheme to use if scheme associated with keyHandle is TPM2_ALG_NULL. 	
in	label 	Label whose association with the message is to be verified. 	
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_RSA_Decrypt_Finish (ESYS_CONTEXT *  esysContext, TPM2B_PUBLIC_KEY_RSA **  message)
Asynchronous finish function for TPM2_RSA_Decrypt
This function returns the results of a TPM2_RSA_Decrypt command invoked via Esys_RSA_Decrypt_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	message 	Decrypted output. (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. 	

The ESAPI function for the TPM2_RSA_Encrypt command.
Functions
TSS2_RC Esys_RSA_Encrypt_Async (ESYS_CONTEXT *esysContext, ESYS_TR keyHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_PUBLIC_KEY_RSA *message, const TPMT_RSA_DECRYPT *inScheme, const TPM2B_DATA *label)
TSS2_RC Esys_RSA_Encrypt (ESYS_CONTEXT *esysContext, ESYS_TR keyHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_PUBLIC_KEY_RSA *message, const TPMT_RSA_DECRYPT *inScheme, const TPM2B_DATA *label, TPM2B_PUBLIC_KEY_RSA **outData)
TSS2_RC Esys_RSA_Encrypt_Finish (ESYS_CONTEXT *esysContext, TPM2B_PUBLIC_KEY_RSA **outData)

Detailed Description
ESAPI function to invoke the TPM2_RSA_Encrypt command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_RSA_Encrypt (ESYS_CONTEXT *  esysContext, ESYS_TR  keyHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_PUBLIC_KEY_RSA *  message, const TPMT_RSA_DECRYPT *  inScheme, const TPM2B_DATA *  label, TPM2B_PUBLIC_KEY_RSA **  outData)
One-Call function for TPM2_RSA_Encrypt
This function invokes the TPM2_RSA_Encrypt command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	keyHandle 	Reference to public portion of RSA key to use for encryption. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	message 	Message to be encrypted. 	
in	inScheme 	TPM2_The padding scheme to use if scheme associated with keyHandle is TPM2_ALG_NULL. 	
in	label 	Optional label L to be associated with the message. 	
out	outData 	Encrypted output. (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_RSA_Encrypt_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  keyHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_PUBLIC_KEY_RSA *  message, const TPMT_RSA_DECRYPT *  inScheme, const TPM2B_DATA *  label)
Asynchronous function for TPM2_RSA_Encrypt
This function invokes the TPM2_RSA_Encrypt 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_RSA_Encrypt_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	keyHandle 	Reference to public portion of RSA key to use for encryption. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	message 	Message to be encrypted. 	
in	inScheme 	TPM2_The padding scheme to use if scheme associated with keyHandle is TPM2_ALG_NULL. 	
in	label 	Optional label L to be associated with the message. 	
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_RSA_Encrypt_Finish (ESYS_CONTEXT *  esysContext, TPM2B_PUBLIC_KEY_RSA **  outData)
Asynchronous finish function for TPM2_RSA_Encrypt
This function returns the results of a TPM2_RSA_Encrypt command invoked via Esys_RSA_Encrypt_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	outData 	Encrypted output. (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. 	

The ESAPI function for the TPM2_SelfTest command.
Functions
TSS2_RC Esys_SelfTest_Async (ESYS_CONTEXT *esysContext, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPMI_YES_NO fullTest)
TSS2_RC Esys_SelfTest (ESYS_CONTEXT *esysContext, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPMI_YES_NO fullTest)
TSS2_RC Esys_SelfTest_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_SelfTest command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_SelfTest (ESYS_CONTEXT *  esysContext, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPMI_YES_NO  fullTest)
One-Call function for TPM2_SelfTest
This function invokes the TPM2_SelfTest command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	fullTest 	YES if full test to be performed. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_SelfTest_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPMI_YES_NO  fullTest)
Asynchronous function for TPM2_SelfTest
This function invokes the TPM2_SelfTest 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_SelfTest_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	fullTest 	YES if full test to be performed. 	
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_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. 	
TSS2_RC Esys_SelfTest_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_SelfTest
This function returns the results of a TPM2_SelfTest command invoked via Esys_SelfTest_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_SequenceComplete command.
Functions
TSS2_RC Esys_SequenceComplete_Finish (ESYS_CONTEXT *esysContext, TPM2B_DIGEST **result, TPMT_TK_HASHCHECK **validation)

Detailed Description
ESAPI function to invoke the TPM2_SequenceComplete command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_SequenceComplete_Finish (ESYS_CONTEXT *  esysContext, TPM2B_DIGEST **  result, TPMT_TK_HASHCHECK **  validation)
Asynchronous finish function for TPM2_SequenceComplete
This function returns the results of a TPM2_SequenceComplete command invoked via Esys_SequenceComplete_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	result 	The returned HMAC or digest in a sized buffer. (callee-allocated) 	
out	validation 	TPM2_Ticket indicating that the sequence of octets used to compute outDigest did not start with TPM2_GENERATED_VALUE. (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. 	

The ESAPI function for the TPM2_SequenceUpdate command.
Functions
TSS2_RC Esys_SequenceUpdate_Async (ESYS_CONTEXT *esysContext, ESYS_TR sequenceHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_MAX_BUFFER *buffer)
TSS2_RC Esys_SequenceUpdate (ESYS_CONTEXT *esysContext, ESYS_TR sequenceHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_MAX_BUFFER *buffer)
TSS2_RC Esys_SequenceUpdate_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_SequenceUpdate command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_SequenceUpdate (ESYS_CONTEXT *  esysContext, ESYS_TR  sequenceHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_MAX_BUFFER *  buffer)
One-Call function for TPM2_SequenceUpdate
This function invokes the TPM2_SequenceUpdate command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	sequenceHandle 	Handle for the sequence object. 	
in	shandle1 	Session handle for authorization of sequenceHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	buffer 	Data to be added to hash. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_SequenceUpdate_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  sequenceHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_MAX_BUFFER *  buffer)
Asynchronous function for TPM2_SequenceUpdate
This function invokes the TPM2_SequenceUpdate 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_SequenceUpdate_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	sequenceHandle 	Handle for the sequence object. 	
in	shandle1 	Session handle for authorization of sequenceHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	buffer 	Data to be added to hash. 	
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_ENCRYPT_PARAM 	if one of the sessions has the 'encrypt' attribute set and the command does not support encryption of the first response parameter. 	
TSS2_RC Esys_SequenceUpdate_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_SequenceUpdate
This function returns the results of a TPM2_SequenceUpdate command invoked via Esys_SequenceUpdate_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_SetAlgorithmSet command.
Functions
TSS2_RC Esys_SetAlgorithmSet_Async (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, UINT32 algorithmSet)
TSS2_RC Esys_SetAlgorithmSet (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, UINT32 algorithmSet)
TSS2_RC Esys_SetAlgorithmSet_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_SetAlgorithmSet command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_SetAlgorithmSet (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, UINT32  algorithmSet)
One-Call function for TPM2_SetAlgorithmSet
This function invokes the TPM2_SetAlgorithmSet command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	TPM2_RH_PLATFORM. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	algorithmSet 	A TPM vendor-dependent value indicating the algorithm set selection. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_SetAlgorithmSet_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, UINT32  algorithmSet)
Asynchronous function for TPM2_SetAlgorithmSet
This function invokes the TPM2_SetAlgorithmSet 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_SetAlgorithmSet_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	TPM2_RH_PLATFORM. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	algorithmSet 	A TPM vendor-dependent value indicating the algorithm set selection. 	
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. 	
TSS2_RC Esys_SetAlgorithmSet_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_SetAlgorithmSet
This function returns the results of a TPM2_SetAlgorithmSet command invoked via Esys_SetAlgorithmSet_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_SetCommandCodeAuditStatus command.
Functions
TSS2_RC Esys_SetCommandCodeAuditStatus_Async (ESYS_CONTEXT *esysContext, ESYS_TR auth, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPMI_ALG_HASH auditAlg, const TPML_CC *setList, const TPML_CC *clearList)
TSS2_RC Esys_SetCommandCodeAuditStatus (ESYS_CONTEXT *esysContext, ESYS_TR auth, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPMI_ALG_HASH auditAlg, const TPML_CC *setList, const TPML_CC *clearList)
TSS2_RC Esys_SetCommandCodeAuditStatus_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_SetCommandCodeAuditStatus command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_SetCommandCodeAuditStatus (ESYS_CONTEXT *  esysContext, ESYS_TR  auth, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPMI_ALG_HASH  auditAlg, const TPML_CC *  setList, const TPML_CC *  clearList)
One-Call function for TPM2_SetCommandCodeAuditStatus
This function invokes the TPM2_SetCommandCodeAuditStatus command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	auth 	TPM2_RH_OWNER or TPM2_RH_PLATFORM+{PP}. 	
in	shandle1 	Session handle for authorization of auth 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	auditAlg 	TPM2_Hash algorithm for the audit digest; if TPM2_ALG_NULL, then the hash is not changed. 	
in	setList 	List of commands that will be added to those that will be audited. 	
in	clearList 	List of commands that will no longer be audited. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_SetCommandCodeAuditStatus_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  auth, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPMI_ALG_HASH  auditAlg, const TPML_CC *  setList, const TPML_CC *  clearList)
Asynchronous function for TPM2_SetCommandCodeAuditStatus
This function invokes the TPM2_SetCommandCodeAuditStatus 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_SetCommandCodeAuditStatus_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	auth 	TPM2_RH_OWNER or TPM2_RH_PLATFORM+{PP}. 	
in	shandle1 	Session handle for authorization of auth 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	auditAlg 	TPM2_Hash algorithm for the audit digest; if TPM2_ALG_NULL, then the hash is not changed. 	
in	setList 	List of commands that will be added to those that will be audited. 	
in	clearList 	List of commands that will no longer be audited. 	
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. 	
TSS2_RC Esys_SetCommandCodeAuditStatus_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_SetCommandCodeAuditStatus
This function returns the results of a TPM2_SetCommandCodeAuditStatus command invoked via Esys_SetCommandCodeAuditStatus_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_SetPrimaryPolicy command.
Functions
TSS2_RC Esys_SetPrimaryPolicy_Async (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DIGEST *authPolicy, TPMI_ALG_HASH hashAlg)
TSS2_RC Esys_SetPrimaryPolicy (ESYS_CONTEXT *esysContext, ESYS_TR authHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DIGEST *authPolicy, TPMI_ALG_HASH hashAlg)
TSS2_RC Esys_SetPrimaryPolicy_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_SetPrimaryPolicy command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_SetPrimaryPolicy (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DIGEST *  authPolicy, TPMI_ALG_HASH  hashAlg)
One-Call function for TPM2_SetPrimaryPolicy
This function invokes the TPM2_SetPrimaryPolicy command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	TPM2_RH_LOCKOUT, TPM2_RH_ENDORSEMENT, TPM2_RH_OWNER or TPM2_RH_PLATFORM+{PP}. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	authPolicy 	An authorization policy digest; may be the Empty Buffer. 	
in	hashAlg 	The hash algorithm to use for the policy. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_SetPrimaryPolicy_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  authHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DIGEST *  authPolicy, TPMI_ALG_HASH  hashAlg)
Asynchronous function for TPM2_SetPrimaryPolicy
This function invokes the TPM2_SetPrimaryPolicy 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_SetPrimaryPolicy_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	authHandle 	TPM2_RH_LOCKOUT, TPM2_RH_ENDORSEMENT, TPM2_RH_OWNER or TPM2_RH_PLATFORM+{PP}. 	
in	shandle1 	Session handle for authorization of authHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	authPolicy 	An authorization policy digest; may be the Empty Buffer. 	
in	hashAlg 	The hash algorithm to use for the policy. 	
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_ENCRYPT_PARAM 	if one of the sessions has the 'encrypt' attribute set and the command does not support encryption of the first response parameter. 	
TSS2_RC Esys_SetPrimaryPolicy_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_SetPrimaryPolicy
This function returns the results of a TPM2_SetPrimaryPolicy command invoked via Esys_SetPrimaryPolicy_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_Shutdown command.
Functions
TSS2_RC Esys_Shutdown_Async (ESYS_CONTEXT *esysContext, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPM2_SU shutdownType)
TSS2_RC Esys_Shutdown (ESYS_CONTEXT *esysContext, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPM2_SU shutdownType)
TSS2_RC Esys_Shutdown_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_Shutdown command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_Shutdown (ESYS_CONTEXT *  esysContext, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPM2_SU  shutdownType)
One-Call function for TPM2_Shutdown
This function invokes the TPM2_Shutdown command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	shutdownType 	TPM2_SU_CLEAR or TPM2_SU_STATE. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_Shutdown_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPM2_SU  shutdownType)
Asynchronous function for TPM2_Shutdown
This function invokes the TPM2_Shutdown 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_Shutdown_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	shutdownType 	TPM2_SU_CLEAR or TPM2_SU_STATE. 	
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_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. 	
TSS2_RC Esys_Shutdown_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_Shutdown
This function returns the results of a TPM2_Shutdown command invoked via Esys_Shutdown_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_Sign command.
Functions
TSS2_RC Esys_Sign_Async (ESYS_CONTEXT *esysContext, ESYS_TR keyHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DIGEST *digest, const TPMT_SIG_SCHEME *inScheme, const TPMT_TK_HASHCHECK *validation)
TSS2_RC Esys_Sign (ESYS_CONTEXT *esysContext, ESYS_TR keyHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DIGEST *digest, const TPMT_SIG_SCHEME *inScheme, const TPMT_TK_HASHCHECK *validation, TPMT_SIGNATURE **signature)
TSS2_RC Esys_Sign_Finish (ESYS_CONTEXT *esysContext, TPMT_SIGNATURE **signature)

Detailed Description
ESAPI function to invoke the TPM2_Sign command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_Sign (ESYS_CONTEXT *  esysContext, ESYS_TR  keyHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DIGEST *  digest, const TPMT_SIG_SCHEME *  inScheme, const TPMT_TK_HASHCHECK *  validation, TPMT_SIGNATURE **  signature)
One-Call function for TPM2_Sign
This function invokes the TPM2_Sign command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	keyHandle 	Handle of key that will perform signing. 	
in	shandle1 	Session handle for authorization of keyHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	digest 	Digest to be signed. 	
in	inScheme 	TPM2_Signing scheme to use if the scheme for keyHandle is TPM2_ALG_NULL. 	
in	validation 	Proof that digest was created by the TPM. 	
out	signature 	The signature. (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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_Sign_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  keyHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DIGEST *  digest, const TPMT_SIG_SCHEME *  inScheme, const TPMT_TK_HASHCHECK *  validation)
Asynchronous function for TPM2_Sign
This function invokes the TPM2_Sign 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_Sign_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	keyHandle 	Handle of key that will perform signing. 	
in	shandle1 	Session handle for authorization of keyHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	digest 	Digest to be signed. 	
in	inScheme 	TPM2_Signing scheme to use if the scheme for keyHandle is TPM2_ALG_NULL. 	
in	validation 	Proof that digest was created by the TPM. 	
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_ENCRYPT_PARAM 	if one of the sessions has the 'encrypt' attribute set and the command does not support encryption of the first response parameter. 	
TSS2_RC Esys_Sign_Finish (ESYS_CONTEXT *  esysContext, TPMT_SIGNATURE **  signature)
Asynchronous finish function for TPM2_Sign
This function returns the results of a TPM2_Sign command invoked via Esys_Sign_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	signature 	The signature. (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. 	

The ESAPI function for the TPM2_StartAuthSession command.
Functions
TSS2_RC Esys_StartAuthSession_Async (ESYS_CONTEXT *esysContext, ESYS_TR tpmKey, ESYS_TR bind, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_NONCE *nonceCaller, TPM2_SE sessionType, const TPMT_SYM_DEF *symmetric, TPMI_ALG_HASH authHash)
TSS2_RC Esys_StartAuthSession (ESYS_CONTEXT *esysContext, ESYS_TR tpmKey, ESYS_TR bind, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_NONCE *nonceCaller, TPM2_SE sessionType, const TPMT_SYM_DEF *symmetric, TPMI_ALG_HASH authHash, ESYS_TR *sessionHandle)

Detailed Description
ESAPI function to invoke the TPM2_StartAuthSession command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_StartAuthSession (ESYS_CONTEXT *  esysContext, ESYS_TR  tpmKey, ESYS_TR  bind, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_NONCE *  nonceCaller, TPM2_SE  sessionType, const TPMT_SYM_DEF *  symmetric, TPMI_ALG_HASH  authHash, ESYS_TR *  sessionHandle)
One-Call function for TPM2_StartAuthSession
This function invokes the TPM2_StartAuthSession command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	tpmKey 	Handle of a loaded decrypt key used to encrypt salt. 	
in	bind 	Entity providing the authValue. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	nonceCaller 	Initial nonceCaller, sets nonceTPM size for the session. 	
in	sessionType 	Indicates the type of the session; simple HMAC or policy (including a trial policy). 	
in	symmetric 	The algorithm and key size for parameter encryption. 	
in	authHash 	Hash algorithm to use for the session. 	
out	sessionHandle 	ESYS_TR handle of ESYS resource for TPMI_SH_AUTH_SESSION. 	
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_StartAuthSession_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  tpmKey, ESYS_TR  bind, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_NONCE *  nonceCaller, TPM2_SE  sessionType, const TPMT_SYM_DEF *  symmetric, TPMI_ALG_HASH  authHash)
Asynchronous function for TPM2_StartAuthSession
This function invokes the TPM2_StartAuthSession 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_StartAuthSession_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	tpmKey 	Handle of a loaded decrypt key used to encrypt salt. 	
in	bind 	Entity providing the authValue. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	nonceCaller 	Initial nonceCaller, sets nonceTPM size for the session. 	
in	sessionType 	Indicates the type of the session; simple HMAC or policy (including a trial policy). 	
in	symmetric 	The algorithm and key size for parameter encryption. 	
in	authHash 	Hash algorithm to use for the session. 	
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. 	

The ESAPI function for the TPM2_Startup command.
Functions
TSS2_RC Esys_Startup_Async (ESYS_CONTEXT *esysContext, TPM2_SU startupType)
TSS2_RC Esys_Startup (ESYS_CONTEXT *esysContext, TPM2_SU startupType)
TSS2_RC Esys_Startup_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_Startup command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_Startup (ESYS_CONTEXT *  esysContext, TPM2_SU  startupType)
One-Call function for TPM2_Startup
This function invokes the TPM2_Startup command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	startupType 	TPM2_SU_CLEAR or TPM2_SU_STATE. 	
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_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_Startup_Async (ESYS_CONTEXT *  esysContext, TPM2_SU  startupType)
Asynchronous function for TPM2_Startup
This function invokes the TPM2_Startup 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_Startup_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	startupType 	TPM2_SU_CLEAR or TPM2_SU_STATE. 	
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_RC Esys_Startup_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_Startup
This function returns the results of a TPM2_Startup command invoked via Esys_Startup_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_StirRandom command.
Functions
TSS2_RC Esys_StirRandom_Async (ESYS_CONTEXT *esysContext, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_SENSITIVE_DATA *inData)
TSS2_RC Esys_StirRandom (ESYS_CONTEXT *esysContext, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_SENSITIVE_DATA *inData)
TSS2_RC Esys_StirRandom_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_StirRandom command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_StirRandom (ESYS_CONTEXT *  esysContext, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_SENSITIVE_DATA *  inData)
One-Call function for TPM2_StirRandom
This function invokes the TPM2_StirRandom command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	inData 	Additional information. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_StirRandom_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_SENSITIVE_DATA *  inData)
Asynchronous function for TPM2_StirRandom
This function invokes the TPM2_StirRandom 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_StirRandom_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	inData 	Additional information. 	
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_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. 	
TSS2_RC Esys_StirRandom_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_StirRandom
This function returns the results of a TPM2_StirRandom command invoked via Esys_StirRandom_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_TestParms command.
Functions
TSS2_RC Esys_TestParms_Async (ESYS_CONTEXT *esysContext, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPMT_PUBLIC_PARMS *parameters)
TSS2_RC Esys_TestParms (ESYS_CONTEXT *esysContext, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPMT_PUBLIC_PARMS *parameters)
TSS2_RC Esys_TestParms_Finish (ESYS_CONTEXT *esysContext)

Detailed Description
ESAPI function to invoke the TPM2_TestParms command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_TestParms (ESYS_CONTEXT *  esysContext, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPMT_PUBLIC_PARMS *  parameters)
One-Call function for TPM2_TestParms
This function invokes the TPM2_TestParms command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	parameters 	Algorithm parameters to be validated. 	
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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_TestParms_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPMT_PUBLIC_PARMS *  parameters)
Asynchronous function for TPM2_TestParms
This function invokes the TPM2_TestParms 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_TestParms_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	parameters 	Algorithm parameters to be validated. 	
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_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. 	
TSS2_RC Esys_TestParms_Finish (ESYS_CONTEXT *  esysContext)
Asynchronous finish function for TPM2_TestParms
This function returns the results of a TPM2_TestParms command invoked via Esys_TestParms_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
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. 	

The ESAPI function for the TPM2_Unseal command.
Functions
TSS2_RC Esys_Unseal_Async (ESYS_CONTEXT *esysContext, ESYS_TR itemHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3)
TSS2_RC Esys_Unseal (ESYS_CONTEXT *esysContext, ESYS_TR itemHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, TPM2B_SENSITIVE_DATA **outData)
TSS2_RC Esys_Unseal_Finish (ESYS_CONTEXT *esysContext, TPM2B_SENSITIVE_DATA **outData)

Detailed Description
ESAPI function to invoke the TPM2_Unseal command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_Unseal (ESYS_CONTEXT *  esysContext, ESYS_TR  itemHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, TPM2B_SENSITIVE_DATA **  outData)
One-Call function for TPM2_Unseal
This function invokes the TPM2_Unseal command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	itemHandle 	Handle of a loaded data object. 	
in	shandle1 	Session handle for authorization of itemHandle 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
out	outData 	Unsealed data. (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_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_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_Unseal_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  itemHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3)
Asynchronous function for TPM2_Unseal
This function invokes the TPM2_Unseal 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_Unseal_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	itemHandle 	Handle of a loaded data object. 	
in	shandle1 	Session handle for authorization of itemHandle 	
in	shandle2 	Second session handle. 	
in	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_RC Esys_Unseal_Finish (ESYS_CONTEXT *  esysContext, TPM2B_SENSITIVE_DATA **  outData)
Asynchronous finish function for TPM2_Unseal
This function returns the results of a TPM2_Unseal command invoked via Esys_Unseal_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	outData 	Unsealed data. (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. 	

The ESAPI function for the TPM2_Vendor_TCG_Test command.
Functions
TSS2_RC Esys_Vendor_TCG_Test_Async (ESYS_CONTEXT *esysContext, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DATA *inputData)
TSS2_RC Esys_Vendor_TCG_Test (ESYS_CONTEXT *esysContext, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DATA *inputData, TPM2B_DATA **outputData)
TSS2_RC Esys_Vendor_TCG_Test_Finish (ESYS_CONTEXT *esysContext, TPM2B_DATA **outputData)

Detailed Description
ESAPI function to invoke the TPM2_Vendor_TCG_Test command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_Vendor_TCG_Test (ESYS_CONTEXT *  esysContext, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DATA *  inputData, TPM2B_DATA **  outputData)
One-Call function for TPM2_Vendor_TCG_Test
This function invokes the TPM2_Vendor_TCG_Test command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	inputData 	Dummy data. 	
out	outputData 	Dummy data. (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_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_Vendor_TCG_Test_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DATA *  inputData)
Asynchronous function for TPM2_Vendor_TCG_Test
This function invokes the TPM2_Vendor_TCG_Test 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_Vendor_TCG_Test_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	inputData 	Dummy data. 	
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_RC Esys_Vendor_TCG_Test_Finish (ESYS_CONTEXT *  esysContext, TPM2B_DATA **  outputData)
Asynchronous finish function for TPM2_Vendor_TCG_Test
This function returns the results of a TPM2_Vendor_TCG_Test command invoked via Esys_Vendor_TCG_Test_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	outputData 	Dummy data. (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. 	

The ESAPI function for the TPM2_VerifySignature command.
Functions
TSS2_RC Esys_VerifySignature_Async (ESYS_CONTEXT *esysContext, ESYS_TR keyHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DIGEST *digest, const TPMT_SIGNATURE *signature)
TSS2_RC Esys_VerifySignature (ESYS_CONTEXT *esysContext, ESYS_TR keyHandle, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_DIGEST *digest, const TPMT_SIGNATURE *signature, TPMT_TK_VERIFIED **validation)
TSS2_RC Esys_VerifySignature_Finish (ESYS_CONTEXT *esysContext, TPMT_TK_VERIFIED **validation)

Detailed Description
ESAPI function to invoke the TPM2_VerifySignature command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_VerifySignature (ESYS_CONTEXT *  esysContext, ESYS_TR  keyHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DIGEST *  digest, const TPMT_SIGNATURE *  signature, TPMT_TK_VERIFIED **  validation)
One-Call function for TPM2_VerifySignature
This function invokes the TPM2_VerifySignature command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	keyHandle 	Handle of public key that will be used in the validation. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	digest 	Digest of the signed message. 	
in	signature 	Signature to be tested. 	
out	validation 	. (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_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. 	
TSS2_RCs 	produced by lower layers of the software stack may be returned to the caller unaltered unless handled internally. 	
TSS2_RC Esys_VerifySignature_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  keyHandle, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_DIGEST *  digest, const TPMT_SIGNATURE *  signature)
Asynchronous function for TPM2_VerifySignature
This function invokes the TPM2_VerifySignature 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_VerifySignature_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	keyHandle 	Handle of public key that will be used in the validation. 	
in	shandle1 	First session handle. 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	digest 	Digest of the signed message. 	
in	signature 	Signature to be tested. 	
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_ENCRYPT_PARAM 	if one of the sessions has the 'encrypt' attribute set and the command does not support encryption of the first response parameter. 	
TSS2_RC Esys_VerifySignature_Finish (ESYS_CONTEXT *  esysContext, TPMT_TK_VERIFIED **  validation)
Asynchronous finish function for TPM2_VerifySignature
This function returns the results of a TPM2_VerifySignature command invoked via Esys_VerifySignature_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	validation 	. (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. 	

The ESAPI function for the TPM2_ZGen_2Phase command.
Functions
TSS2_RC Esys_ZGen_2Phase_Async (ESYS_CONTEXT *esysContext, ESYS_TR keyA, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_ECC_POINT *inQsB, const TPM2B_ECC_POINT *inQeB, TPMI_ECC_KEY_EXCHANGE inScheme, UINT16 counter)
TSS2_RC Esys_ZGen_2Phase (ESYS_CONTEXT *esysContext, ESYS_TR keyA, ESYS_TR shandle1, ESYS_TR shandle2, ESYS_TR shandle3, const TPM2B_ECC_POINT *inQsB, const TPM2B_ECC_POINT *inQeB, TPMI_ECC_KEY_EXCHANGE inScheme, UINT16 counter, TPM2B_ECC_POINT **outZ1, TPM2B_ECC_POINT **outZ2)
TSS2_RC Esys_ZGen_2Phase_Finish (ESYS_CONTEXT *esysContext, TPM2B_ECC_POINT **outZ1, TPM2B_ECC_POINT **outZ2)

Detailed Description
ESAPI function to invoke the TPM2_ZGen_2Phase command either as a one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Esys_ZGen_2Phase (ESYS_CONTEXT *  esysContext, ESYS_TR  keyA, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_ECC_POINT *  inQsB, const TPM2B_ECC_POINT *  inQeB, TPMI_ECC_KEY_EXCHANGE  inScheme, UINT16  counter, TPM2B_ECC_POINT **  outZ1, TPM2B_ECC_POINT **  outZ2)
One-Call function for TPM2_ZGen_2Phase
This function invokes the TPM2_ZGen_2Phase command in a one-call variant. This means the function will block until the TPM response is available. All input parameters are const. The memory for non-simple output parameters is allocated by the function implementation.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	keyA 	Handle of an unrestricted decryption key ECC. 	
in	shandle1 	Session handle for authorization of keyA 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	inQsB 	Other party's static public key (Qs,B = (Xs,B, Ys,B)). 	
in	inQeB 	Other party's ephemeral public key (Qe,B = (Xe,B, Ye,B)). 	
in	inScheme 	The key exchange scheme. 	
in	counter 	Value returned by TPM2_EC_Ephemeral(). 	
out	outZ1 	X and Y coordinates of the computed value (scheme dependent). (callee-allocated) 	
out	outZ2 	X and Y coordinates of the second computed value (scheme dependent). (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_ZGen_2Phase_Async (ESYS_CONTEXT *  esysContext, ESYS_TR  keyA, ESYS_TR  shandle1, ESYS_TR  shandle2, ESYS_TR  shandle3, const TPM2B_ECC_POINT *  inQsB, const TPM2B_ECC_POINT *  inQeB, TPMI_ECC_KEY_EXCHANGE  inScheme, UINT16  counter)
Asynchronous function for TPM2_ZGen_2Phase
This function invokes the TPM2_ZGen_2Phase 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_ZGen_2Phase_Finish.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
in	keyA 	Handle of an unrestricted decryption key ECC. 	
in	shandle1 	Session handle for authorization of keyA 	
in	shandle2 	Second session handle. 	
in	shandle3 	Third session handle. 	
in	inQsB 	Other party's static public key (Qs,B = (Xs,B, Ys,B)). 	
in	inQeB 	Other party's ephemeral public key (Qe,B = (Xe,B, Ye,B)). 	
in	inScheme 	The key exchange scheme. 	
in	counter 	Value returned by TPM2_EC_Ephemeral(). 	
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_ZGen_2Phase_Finish (ESYS_CONTEXT *  esysContext, TPM2B_ECC_POINT **  outZ1, TPM2B_ECC_POINT **  outZ2)
Asynchronous finish function for TPM2_ZGen_2Phase
This function returns the results of a TPM2_ZGen_2Phase command invoked via Esys_ZGen_2Phase_Finish. All non-simple output parameters are allocated by the function's implementation. NULL can be passed for every output parameter if the value is not required.
Parameters:
in,out	esysContext 	The ESYS_CONTEXT. 	
out	outZ1 	X and Y coordinates of the computed value (scheme dependent). (callee-allocated) 	
out	outZ2 	X and Y coordinates of the second computed value (scheme dependent). (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. 	

Internals of Enhanced System API
Modules
Internal ESAPI Types
Internal Cryptographic Backend
Internal ESAPI utility functions.

Detailed Description
This module holds internal APIs of the ESAPI implementation. 

Internal ESAPI Types
Data Structures
struct RSRC_NODE_T
struct ESYS_CONTEXT
struct IESYS_SESSION
union IESYS_RSRC_UNION
struct IESYS_RESOURCE
struct IESYS_METADATA
struct IESYS_CONTEXT_DATA
Macros
#define _ESYS_MAX_SUBMISSIONS  5
#define _ESYS_ASSERT_NON_NULL(x)
#define IESYSC_KEY_RSRC  1
#define IESYSC_NV_RSRC  2
#define IESYSC_SESSION_RSRC  3
#define IESYSC_WITHOUT_MISC_RSRC  0
#define ENCRYPT  1
#define NO_ENCRYPT  0
#define DECRYPT  1
#define NO_DECRYPT  0
#define POLICY_PASSWORD  2
#define POLICY_AUTH  1
#define NO_POLICY_AUTH  0
Typedefs
typedef struct RSRC_NODE_T RSRC_NODE_T
typedef UINT32 IESYSC_RESOURCE_TYPE_CONSTANT
typedef UINT32 IESYSC_PARAM_ENCRYPT
typedef UINT32 IESYSC_PARAM_DECRYPT
typedef UINT32 IESYSC_TYPE_POLICY_AUTH
typedef UINT32 IESYSC_RESOURCE_TYPE
Enumerations
enum _ESYS_STATE { _ESYS_STATE_INIT = 0, _ESYS_STATE_SENT, _ESYS_STATE_RESUBMISSION, _ESYS_STATE_INTERNALERROR }

Detailed Description
The ESAPI implementation requires a set of internal type definitions. 

Data Structure Documentation
struct RSRC_NODE_T
Linked list type for object meta data.
This structure represents a linked list to store meta data information of type IESYS_RESOURCE. 
Data Fields
ESYS_TR esys_handle
TPM2B_AUTH auth
IESYS_RESOURCE rsrc
struct RSRC_NODE_T * next

Field Documentation
TPM2B_AUTH auth
The authValue for this resource object. 
ESYS_TR esys_handle
The ESYS_TR handle used by the application to reference this entry. 
struct RSRC_NODE_T* next
The next object in the linked list. 
IESYS_RESOURCE rsrc
The meta data for this resource object. 
struct ESYS_CONTEXT
The data structure holding internal state information.
Each ESYS_CONTEXT respresents a logically independent connection to the TPM. It stores meta data information about object in order to calculate session auths and similar things. 
Data Fields
enum _ESYS_STATE state
TSS2_SYS_CONTEXT * sys
ESYS_TR esys_handle_cnt
RSRC_NODE_T * rsrc_list
int32_t timeout
ESYS_TR session_type [3]
RSRC_NODE_T * session_tab [3]
int encryptNonceIdx
TPM2B_NONCE * encryptNonce
int authsCount
int submissionCount
TPM2B_DATA salt
IESYS_CMD_IN_PARAM in
ESYS_TR esys_handle
TSS2_TCTI_CONTEXT * tcti_app_param
void * dlhandle
IESYS_SESSION * enc_session

Field Documentation
int authsCount
The number of session provided during the command. 
void* dlhandle
The handle of dlopen if the tcti was automatically loaded. 
IESYS_SESSION* enc_session
Ptr to the enc param session. Used to restore session attributes 
TPM2B_NONCE* encryptNonce
The nonce of the encrypt session, or NULL if no encrypt session exists. 
int encryptNonceIdx
The index of the encrypt session. 
ESYS_TR esys_handle
Temporary storage for the object's TPM handle during Esys_TR_FromTPMPublic. 
ESYS_TR esys_handle_cnt
The next free ESYS_TR number. 
IESYS_CMD_IN_PARAM in
Temporary storage for Input parameters needed in corresponding _Finish function 
RSRC_NODE_T* rsrc_list
The linked list of all ESYS_TR objects. 
TPM2B_DATA salt
The salt used during a StartAuthSession. 
RSRC_NODE_T* session_tab[3]
The list of TPM session meta data in the current command execution. 
ESYS_TR session_type[3]
The list of TPM session handles in the current command execution. 
enum _ESYS_STATE state
The current state of the ESAPI context. 
int submissionCount
The current number of submissions of this command to the TPM. 
TSS2_SYS_CONTEXT* sys
The SYS context used internally to talk to the TPM. 
TSS2_TCTI_CONTEXT* tcti_app_param
The TCTI context provided by the application during Esys_Initialize() to be returned from Esys_GetTcti(). 
int32_t timeout
The timeout to be used during Tss2_Sys_ExecuteFinish. 
struct IESYS_SESSION
Type for representing TPM-Session 
Data Fields
TPM2B_NAME bound_entity
TPM2B_ENCRYPTED_SECRET encryptedSalt
TPM2B_DATA salt
TPMT_SYM_DEF symmetric
TPMI_ALG_HASH authHash
TPM2B_DIGEST sessionKey
TPM2_SE sessionType
TPMA_SESSION sessionAttributes
TPMA_SESSION origSessionAttributes
TPM2B_NONCE nonceCaller
TPM2B_NONCE nonceTPM
IESYSC_PARAM_ENCRYPT encrypt
IESYSC_PARAM_DECRYPT decrypt
IESYSC_TYPE_POLICY_AUTH type_policy_session
UINT16 sizeSessionValue
BYTE sessionValue [2 *sizeof(TPMU_HA)]
UINT16 sizeHmacValue

Field Documentation
TPMI_ALG_HASH authHash
Hashalg used for authorization 
TPM2B_NAME bound_entity
Entity to which the session is bound 
IESYSC_PARAM_DECRYPT decrypt
Indicate parameter decryption by the TPM 
IESYSC_PARAM_ENCRYPT encrypt
Indicate parameter encryption by the TPM 
TPM2B_ENCRYPTED_SECRET encryptedSalt
Encrypted salt which can be provided by application 
TPM2B_NONCE nonceCaller
Nonce computed by the ESAPI for every session call 
TPM2B_NONCE nonceTPM
Nonce which is returned by the TPM for every session call 
TPMA_SESSION origSessionAttributes
Copy of flags which define the session behaviour 
TPM2B_DATA salt
Salt computed if no encrypted salt is provided 
TPMA_SESSION sessionAttributes
Flags which define the session behaviour 
TPM2B_DIGEST sessionKey
sessionKey used for KDFa to compute symKey 
TPM2_SE sessionType
Type of the session (HMAC, Policy) 
BYTE sessionValue[2 *sizeof(TPMU_HA)]
sessionKey || AuthValue 
UINT16 sizeHmacValue
Size of sessionKey plus optionally authValue 
UINT16 sizeSessionValue
Size of sessionKey plus optionally authValue 
TPMT_SYM_DEF symmetric
Algorithm selection for parameter encryption 
IESYSC_TYPE_POLICY_AUTH type_policy_session
Field to store markers for policy sessions 
union IESYS_RSRC_UNION
Type for representing public info of a TPM-Resource 
Data Fields
TPM2B_PUBLIC rsrc_key_pub
TPM2B_NV_PUBLIC rsrc_nv_pub
IESYS_SESSION rsrc_session
TPMS_EMPTY rsrc_empty

Field Documentation
TPMS_EMPTY rsrc_empty
no specialized date for resource 
TPM2B_PUBLIC rsrc_key_pub
Public info for key objects 
TPM2B_NV_PUBLIC rsrc_nv_pub
Public info for NV ram objects 
IESYS_SESSION rsrc_session
Internal esapi session information 
struct IESYS_RESOURCE
Type for representing TPM-Resource 
Data Fields
TPM2_HANDLE handle
TPM2B_NAME name
IESYSC_RESOURCE_TYPE rsrcType
IESYS_RSRC_UNION misc

Field Documentation
TPM2_HANDLE handle
Handle used by TPM 
IESYS_RSRC_UNION misc
Resource specific information 
TPM2B_NAME name
TPM name of the object 
IESYSC_RESOURCE_TYPE rsrcType
Selector for resource type 
struct IESYS_METADATA
Esys resource with size field 
Data Fields
UINT16 size
IESYS_RESOURCE data

Field Documentation
IESYS_RESOURCE data
Esys resource data 
UINT16 size
size of the operand buffer 
struct IESYS_CONTEXT_DATA
Type for representing ESYS metadata 
Data Fields
UINT32 reserved
TPM2B_CONTEXT_DATA tpmContext
IESYS_METADATA esysMetadata

Field Documentation
IESYS_METADATA esysMetadata
Meta data of the ESY_TR object 
UINT32 reserved
Must allways be zero 
TPM2B_CONTEXT_DATA tpmContext
Context information computed by tpm 

Macro Definition Documentation
#define _ESYS_ASSERT_NON_NULL( x)
Value:if (x == NULL) { \
        LOG_ERROR(str(x) " == NULL."); \
        return TSS2_ESYS_RC_BAD_REFERENCE; \
    }
Makro testing parameters against null. 
#define _ESYS_MAX_SUBMISSIONS  5
The number of authomatic resubmissions.
The number of resubmissions before a TPM's TPM2_RC_YIELDED is forwarded to the application. 
#define DECRYPT  1
Parameter decryption by TPM 
#define ENCRYPT  1
Parameter encryption by TPM 
#define IESYSC_KEY_RSRC  1
Tag for key resource 
#define IESYSC_NV_RSRC  2
Tag for NV Ram resource 
#define IESYSC_SESSION_RSRC  3
Tag for session resources 
#define IESYSC_WITHOUT_MISC_RSRC  0
Tag for other resources, e.g. PCR register, hierarchies 
#define NO_DECRYPT  0
No parameter decryption by TPM 
#define NO_ENCRYPT  0
No parameter encryption by TPM 
#define NO_POLICY_AUTH  0
no special handling 
#define POLICY_AUTH  1
Marker to include the auth value in the HMAC key 
#define POLICY_PASSWORD  2
Marker to include auth value of the authorized object 

Typedef Documentation
IESYSC_PARAM_DECRYPT
Type to indicate parameter decryption (by TPM) 
IESYSC_PARAM_ENCRYPT
Type to indicate parameter encryption (by TPM) 
IESYSC_RESOURCE_TYPE
Selector type for esys resources 
IESYSC_RESOURCE_TYPE_CONSTANT
Type of resource 
IESYSC_TYPE_POLICY_AUTH
Type of policy authorization 
RSRC_NODE_T
Linked list type for object meta data.
This structure represents a linked list to store meta data information of type IESYS_RESOURCE. 

Enumeration Type Documentation
enum _ESYS_STATE
The states for the ESAPI's internal state machine 

Internal Cryptographic Backend
Functions
TSS2_RC iesys_crypto_hash_get_digest_size (TPM2_ALG_ID hashAlg, size_t *size)
TSS2_RC iesys_cryptossl_hash_start (IESYS_CRYPTO_CONTEXT_BLOB **context, TPM2_ALG_ID hashAlg)
TSS2_RC iesys_cryptossl_hash_update (IESYS_CRYPTO_CONTEXT_BLOB *context, const uint8_t *buffer, size_t size)
TSS2_RC iesys_cryptossl_hash_update2b (IESYS_CRYPTO_CONTEXT_BLOB *context, TPM2B *b)
TSS2_RC iesys_cryptossl_hash_finish (IESYS_CRYPTO_CONTEXT_BLOB **context, uint8_t *buffer, size_t *size)
TSS2_RC iesys_cryptossl_hash_finish2b (IESYS_CRYPTO_CONTEXT_BLOB **context, TPM2B *b)
TSS2_RC iesys_cryptossl_hmac_start (IESYS_CRYPTO_CONTEXT_BLOB **context, TPM2_ALG_ID hashAlg, const uint8_t *key, size_t size)
TSS2_RC iesys_cryptossl_hmac_start2b (IESYS_CRYPTO_CONTEXT_BLOB **context, TPM2_ALG_ID hmacAlg, TPM2B *b)
TSS2_RC iesys_cryptossl_hmac_update (IESYS_CRYPTO_CONTEXT_BLOB *context, const uint8_t *buffer, size_t size)
TSS2_RC iesys_cryptossl_hmac_update2b (IESYS_CRYPTO_CONTEXT_BLOB *context, TPM2B *b)
TSS2_RC iesys_cryptossl_hmac_finish (IESYS_CRYPTO_CONTEXT_BLOB **context, uint8_t *buffer, size_t *size)
TSS2_RC iesys_cryptossl_hmac_finish2b (IESYS_CRYPTO_CONTEXT_BLOB **context, TPM2B *hmac)
void iesys_cryptossl_hmac_abort (IESYS_CRYPTO_CONTEXT_BLOB **context)
TSS2_RC iesys_crypto_pHash (TPM2_ALG_ID alg, const uint8_t rcBuffer[4], const uint8_t ccBuffer[4], const TPM2B_NAME *name1, const TPM2B_NAME *name2, const TPM2B_NAME *name3, const uint8_t *pBuffer, size_t pBuffer_size, uint8_t *pHash, size_t *pHash_size)
TSS2_RC iesys_crypto_authHmac (TPM2_ALG_ID alg, uint8_t *hmacKey, size_t hmacKeySize, const uint8_t *pHash, size_t pHash_size, const TPM2B_NONCE *nonceNewer, const TPM2B_NONCE *nonceOlder, const TPM2B_NONCE *nonceDecrypt, const TPM2B_NONCE *nonceEncrypt, TPMA_SESSION sessionAttributes, TPM2B_AUTH *hmac)
TSS2_RC iesys_cryptossl_random2b (TPM2B_NONCE *nonce, size_t num_bytes)
TSS2_RC iesys_cryptossl_pk_encrypt (TPM2B_PUBLIC *pub_tpm_key, size_t in_size, BYTE *in_buffer, size_t max_out_size, BYTE *out_buffer, size_t *out_size, const char *label)
TSS2_RC iesys_crypto_KDFaHmac (TPM2_ALG_ID alg, uint8_t *hmacKey, size_t hmacKeySize, uint32_t counter, const char *label, TPM2B_NONCE *contextU, TPM2B_NONCE *contextV, uint32_t bitlength, uint8_t *hmac, size_t *hmacSize)
TSS2_RC iesys_crypto_KDFa (TPM2_ALG_ID hashAlg, uint8_t *hmacKey, size_t hmacKeySize, const char *label, TPM2B_NONCE *contextU, TPM2B_NONCE *contextV, uint32_t bitLength, uint32_t *counterInOut, BYTE *outKey, BOOL use_digest_size)
TSS2_RC iesys_crypto_KDFe (TPM2_ALG_ID hashAlg, TPM2B_ECC_PARAMETER *Z, const char *label, TPM2B_ECC_PARAMETER *partyUInfo, TPM2B_ECC_PARAMETER *partyVInfo, UINT32 bit_size, BYTE *key)
TSS2_RC iesys_xor_parameter_obfuscation (TPM2_ALG_ID hash_alg, uint8_t *key, size_t key_size, TPM2B_NONCE *contextU, TPM2B_NONCE *contextV, BYTE *data, size_t data_size)
TSS2_RC iesys_cryptossl_get_ecdh_point (TPM2B_PUBLIC *key, size_t max_out_size, TPM2B_ECC_PARAMETER *Z, TPMS_ECC_POINT *Q, BYTE *out_buffer, size_t *out_size)

Detailed Description
The types and functions used internally by ESAPI for cryptographic operations. Multiple implementations of these functions may exist for different cryptographic backends. 

Function Documentation
TSS2_RC iesys_crypto_authHmac (TPM2_ALG_ID  alg, uint8_t *  hmacKey, size_t  hmacKeySize, const uint8_t *  pHash, size_t  pHash_size, const TPM2B_NONCE *  nonceNewer, const TPM2B_NONCE *  nonceOlder, const TPM2B_NONCE *  nonceDecrypt, const TPM2B_NONCE *  nonceEncrypt, TPMA_SESSION  sessionAttributes, TPM2B_AUTH *  hmac)
Compute the HMAC for authorization.
Based on the session nonces, caller nonce, TPM nonce, if used encryption and decryption nonce, the command parameter hash, and the session attributes the HMAC used for authorization is computed. 
Parameters:
in	alg 	The hash algorithm used for HMAC computation. 	
in	hmacKey 	The HMAC key byte buffer. 	
in	hmacKeySize 	The size of the HMAC key byte buffer. 	
in	pHash 	The command parameter hash byte buffer. 	
in	pHash_size 	The size of the command parameter hash byte buffer. 	
in	nonceNewer 	The TPM nonce. 	
in	nonceOlder 	The caller nonce. 	
in	nonceDecrypt 	The decrypt nonce (NULL if not used). 	
in	nonceEncrypt 	The encrypt nonce (NULL if not used). 	
in	sessionAttributes 	The attributes used for the current authentication. 	
out	hmac 	The computed HMAC. 	
Return values:
TSS2_RC_SUCCESS 	on success 	
TSS2_ESYS_RC_BAD_REFERENCE 	If a pointer is invalid. 	
TSS2_RC iesys_crypto_hash_get_digest_size (TPM2_ALG_ID  hashAlg, size_t *  size)
Provide the digest size for a given hash algorithm.
This function provides the size of the digest for a given hash algorithm.
Parameters:
in	hashAlg 	The hash algorithm to get the size for. 	
out	size 	The side of a digest of the hash algorithm. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_ESYS_RC_BAD_VALUE 	if hashAlg is unknown or unsupported. 	
TSS2_RC iesys_crypto_KDFa (TPM2_ALG_ID  hashAlg, uint8_t *  hmacKey, size_t  hmacKeySize, const char *  label, TPM2B_NONCE *  contextU, TPM2B_NONCE *  contextV, uint32_t  bitLength, uint32_t *  counterInOut, BYTE *  outKey, BOOL  use_digest_size)
KDFa Key derivation.
Except of ECDH this function is used for key derivation. 
Parameters:
in	hashAlg 	The hash algorithm to use. 	
in	hmacKey 	The hmacKey used in KDFa. 	
in	hmacKeySize 	The size of the HMAC key. 	
in	label 	Indicates the use of the produced key. 	
in	contextU,contextV 	are used for construction of a binary string containing information related to the derived key. 	
in	bitLength 	The size of generated key in bits. 	
in,out	counterInOut 	Counter for the KDFa iterations. If set, the value will be used for the firt iteration step. The final counter value will be written to counterInOut. 	
out	outKey 	Byte buffer for the derived key (caller-allocated). 	
in	use_digest_size 	Indicate whether the digest size of hashAlg is used as size of the generated key or the bitLength parameter is used. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_ESYS_RC_BAD_VALUE 	if hashAlg is unknown or unsupported. 	
TSS2_RC iesys_crypto_KDFaHmac (TPM2_ALG_ID  alg, uint8_t *  hmacKey, size_t  hmacKeySize, uint32_t  counter, const char *  label, TPM2B_NONCE *  contextU, TPM2B_NONCE *  contextV, uint32_t  bitlength, uint8_t *  hmac, size_t *  hmacSize)
HMAC computation for inner loop of KDFa key derivation.
Except of ECDH this function is used for key derivation. 
Parameters:
in	alg 	The algorithm used for the HMAC. 	
in	hmacKey 	The hmacKey used in KDFa. 	
in	hmacKeySize 	The size of the HMAC key. 	
in	counter 	The curren iteration step. 	
in	label 	Indicates the use of the produced key. 	
in	contextU,contextV 	are used for construction of a binary string containing information related to the derived key. 	
in	bitlength 	The size of the generated key in bits. 	
out	hmac 	Byte buffer for the generated HMAC key (caller-allocated). 	
out	hmacSize 	Size of the generated HMAC key. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_ESYS_RC_BAD_REFERENCE 	for invalid parameters. 	
TSS2_RC iesys_crypto_KDFe (TPM2_ALG_ID  hashAlg, TPM2B_ECC_PARAMETER *  Z, const char *  label, TPM2B_ECC_PARAMETER *  partyUInfo, TPM2B_ECC_PARAMETER *  partyVInfo, UINT32  bit_size, BYTE *  key)
Compute KDFe as described in TPM spec part 1 C 6.1
Parameters:
hashAlg 	[in] The nameAlg of the recipient key. 	
Z 	[in] the x coordinate (xP) of the product (P) of a public point and a private key. 	
label 	[in] KDF label. 	
partyUInfo 	[in] The x-coordinate of the secret exchange value (Qe,U). 	
partyVInfo 	[in] The x-coordinate of a public key (Qs,V). 	
bit_size 	[in] Bit size of generated key. 	
key 	[out] Key buffer. 	
Return values:
TSS2_RC_SUCCESS 	on success 	
TSS2_ESYS_RC_BAD_REFERENCE 	for invalid parameters 	
TSS2_ESYS_RC_MEMORY 	Memory cannot be allocated. 	
TSS2_RC iesys_crypto_pHash (TPM2_ALG_ID  alg, const uint8_t  rcBuffer[4], const uint8_t  ccBuffer[4], const TPM2B_NAME *  name1, const TPM2B_NAME *  name2, const TPM2B_NAME *  name3, const uint8_t *  pBuffer, size_t  pBuffer_size, uint8_t *  pHash, size_t *  pHash_size)
Compute the command or response parameter hash.
These hashes are needed for the computation of the HMAC used for the authorization of commands, or for the HMAC used for checking the responses. The name parameters are only used for the command parameter hash (cp) and must be NULL for the computation of the response parameter rp hash (rp). 
Parameters:
in	alg 	The hash algorithm. 	
in	rcBuffer 	The response code in marshaled form. 	
in	ccBuffer 	The command code in marshaled form. 	
in	name1,name2,name3 	The names associated with the corresponding handle. Must be NULL if no handle is passed. 	
in	pBuffer 	The byte buffer or the command or the response. 	
in	pBuffer_size 	The size of the command or response. 	
out	pHash 	The result digest. 	
out	pHash_size 	The size of the result digest. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_ESYS_RC_BAD_REFERENCE 	for invalid parameters. 	
TSS2_RC iesys_cryptossl_get_ecdh_point (TPM2B_PUBLIC *  key, size_t  max_out_size, TPM2B_ECC_PARAMETER *  Z, TPMS_ECC_POINT *  Q, BYTE *  out_buffer, size_t *  out_size)
Computation of ephemeral ECC key and shared secret Z.
According to the description in TPM spec part 1 C 6.1 a shared secret between application and TPM is computed (ECDH). An ephemeral ECC key and a TPM keyare used for the ECDH key exchange. 
Parameters:
in	key 	The key to be used for ECDH key exchange. 	
in	max_out_size 	the max size for the output of the public key of the computed ephemeral key. 	
out	Z 	The computed shared secret. 	
out	Q 	The public part of the ephemeral key in TPM format. 	
out	out_buffer 	The public part of the ephemeral key will be marshaled to this buffer. 	
out	out_size 	The size of the marshaled output. 	
Return values:
TSS2_RC_SUCCESS 	on success 	
TSS2_ESYS_RC_BAD_VALUE 	The algorithm of key is not implemented. 	
TSS2_ESYS_RC_GENERAL_FAILURE 	The internal crypto engine failed. 	
TSS2_RC iesys_cryptossl_hash_finish (IESYS_CRYPTO_CONTEXT_BLOB **  context, uint8_t *  buffer, size_t *  size)
Get the digest value of a digest object and close the context.
The digest value will written to a passed buffer and the resources of the digest object are released. 
Parameters:
in,out	context 	The context of the digest object to be released 	
out	buffer 	The buffer for the digest value (caller-allocated). 	
out	size 	The size of the digest. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_ESYS_RC_BAD_REFERENCE 	for invalid parameters. 	
TSS2_ESYS_RC_GENERAL_FAILURE 	for errors of the crypto library. 	
TSS2_RC iesys_cryptossl_hash_finish2b (IESYS_CRYPTO_CONTEXT_BLOB **  context, TPM2B *  b)
void iesys_cryptossl_hash_abort(IESYS_CRYPTO_CONTEXT_BLOB **context) 
TSS2_RC iesys_cryptossl_hash_start (IESYS_CRYPTO_CONTEXT_BLOB **  context, TPM2_ALG_ID  hashAlg)
Provide the context for the computation of a hash digest.
The context will be created and initialized according to the hash function. 
Parameters:
out	context 	The created context (callee-allocated). 	
in	hashAlg 	The hash algorithm for the creation of the context. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_ESYS_RC_BAD_VALUE 	or TSS2_ESYS_RC_BAD_REFERENCE for invalid parameters. 	
TSS2_ESYS_RC_MEMORY 	Memory cannot be allocated. 	
TSS2_ESYS_RC_GENERAL_FAILURE 	for errors of the crypto library. 	
TSS2_RC iesys_cryptossl_hash_update (IESYS_CRYPTO_CONTEXT_BLOB *  context, const uint8_t *  buffer, size_t  size)
Update the digest value of a digest object from a byte buffer.
The context of a digest object will be updated according to the hash algorithm of the context. < 
Parameters:
in,out	context 	The context of the digest object which will be updated. 	
in	buffer 	The data for the update. 	
in	size 	The size of the data buffer. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_ESYS_RC_BAD_REFERENCE 	for invalid parameters. 	
TSS2_RC iesys_cryptossl_hash_update2b (IESYS_CRYPTO_CONTEXT_BLOB *  context, TPM2B *  b)
Update the digest value of a digest object from a TPM2B object.
The context of a digest object will be updated according to the hash algorithm of the context. 
Parameters:
in,out	context 	The context of the digest object which will be updated. 	
in	b 	The TPM2B object for the update. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_ESYS_RC_BAD_REFERENCE 	for invalid parameters. 	
void iesys_cryptossl_hmac_abort (IESYS_CRYPTO_CONTEXT_BLOB **  context)
Release the resources of an HAMC object.
The assigned resources will be released and the context will be set to NULL. 
Parameters:
in,out	context 	The context of the HMAC object. 	
TSS2_RC iesys_cryptossl_hmac_finish (IESYS_CRYPTO_CONTEXT_BLOB **  context, uint8_t *  buffer, size_t *  size)
Write the HMAC digest value to a byte buffer and close the context.
The digest value will written to a passed buffer and the resources of the HMAC object are released. 
Parameters:
in,out	context 	The context of the HMAC object. 	
out	buffer 	The buffer for the digest value (caller-allocated). 	
out	size 	The size of the digest. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_ESYS_RC_BAD_REFERENCE 	for invalid parameters. 	
TSS2_ESYS_RC_BAD_SIZE 	If the size passed is lower than the HMAC length. 	
TSS2_ESYS_RC_GENERAL_FAILURE 	for errors of the crypto library. 	
TSS2_RC iesys_cryptossl_hmac_finish2b (IESYS_CRYPTO_CONTEXT_BLOB **  context, TPM2B *  hmac)
Write the HMAC digest value to a TPM2B object and close the context.
The digest value will written to a passed TPM2B object and the resources of the HMAC object are released. 
Parameters:
in,out	context 	The context of the HMAC object. 	
out	hmac 	The buffer for the digest value (caller-allocated). 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_ESYS_RC_BAD_REFERENCE 	for invalid parameters. 	
TSS2_ESYS_RC_BAD_SIZE 	if the size passed is lower than the HMAC length. 	
TSS2_ESYS_RC_GENERAL_FAILURE 	for errors of the crypto library. 	
TSS2_RC iesys_cryptossl_hmac_start (IESYS_CRYPTO_CONTEXT_BLOB **  context, TPM2_ALG_ID  hashAlg, const uint8_t *  key, size_t  size)
Provide the context an HMAC digest object from a byte buffer key.
The context will be created and initialized according to the hash function and the used HMAC key. 
Parameters:
out	context 	The created context (callee-allocated). 	
in	hashAlg 	The hash algorithm for the HMAC computation. 	
in	key 	The byte buffer of the HMAC key. 	
in	size 	The size of the HMAC key. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_ESYS_RC_BAD_REFERENCE 	for invalid parameters. 	
TSS2_ESYS_RC_MEMORY 	Memory cannot be allocated. 	
TSS2_ESYS_RC_GENERAL_FAILURE 	for errors of the crypto library. 	
TSS2_RC iesys_cryptossl_hmac_update (IESYS_CRYPTO_CONTEXT_BLOB *  context, const uint8_t *  buffer, size_t  size)
Update and HMAC digest value from a byte buffer.
The context of a digest object will be updated according to the hash algorithm and the key of the context. 
Parameters:
in,out	context 	The context of the digest object which will be updated. 	
in	buffer 	The data for the update. 	
in	size 	The size of the data buffer. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_ESYS_RC_BAD_REFERENCE 	for invalid parameters. 	
TSS2_RC iesys_cryptossl_hmac_update2b (IESYS_CRYPTO_CONTEXT_BLOB *  context, TPM2B *  b)
Update and HMAC digest value from a TPM2B object.
The context of a digest object will be updated according to the hash algorithm and the key of the context. 
Parameters:
in,out	context 	The context of the digest object which will be updated. 	
in	b 	The TPM2B object for the update. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_ESYS_RC_BAD_REFERENCE 	for invalid parameters. 	
TSS2_RC iesys_cryptossl_pk_encrypt (TPM2B_PUBLIC *  pub_tpm_key, size_t  in_size, BYTE *  in_buffer, size_t  max_out_size, BYTE *  out_buffer, size_t *  out_size, const char *  label)
Encryption of a buffer using a public (RSA) key.
Encrypting a buffer using a public key is used for example during Esys_StartAuthSession in order to encrypt the salt value. 
Parameters:
in	pub_tpm_key 	The key to be used for encryption. 	
in	in_size 	The size of the buffer to be encrypted. 	
in	in_buffer 	The data buffer to be encrypted. 	
in	max_out_size 	The maximum size for the output encrypted buffer. 	
out	out_buffer 	The encrypted buffer. 	
out	out_size 	The size of the encrypted output. 	
in	label 	The label used in the encryption scheme. 	
Return values:
TSS2_RC_SUCCESS 	on success 	
TSS2_ESYS_RC_BAD_VALUE 	The algorithm of key is not implemented. 	
TSS2_ESYS_RC_GENERAL_FAILURE 	The internal crypto engine failed. 	
TSS2_RC iesys_cryptossl_random2b (TPM2B_NONCE *  nonce, size_t  num_bytes)
Compute random TPM2B data.
The random data will be generated and written to a passed TPM2B structure. 
Parameters:
out	nonce 	The TPM2B structure for the random data (caller-allocated). 	
in	num_bytes 	The number of bytes to be generated. 	
Return values:
TSS2_RC_SUCCESS 	on success.	
NOTE: the TPM should not be used to obtain the random data 
TSS2_RC iesys_xor_parameter_obfuscation (TPM2_ALG_ID  hash_alg, uint8_t *  key, size_t  key_size, TPM2B_NONCE *  contextU, TPM2B_NONCE *  contextV, BYTE *  data, size_t  data_size)
Encryption/Decryption using XOR obfuscation.
The application of this function to data encrypted with this function will produce the origin data. The key for XOR obfuscation will be derived with KDFa form the passed key the session nonces, and the hash algorithm. 
Parameters:
in	hash_alg 	The algorithm used for key derivation. 	
in	key 	key used for obfuscation 	
in	key_size 	Key size in bits. 	
in	contextU,contextV 	are used for construction of a binary string containing information related to the derived key. 	
in,out	data 	Data to be encrypted/decrypted the result will be will be stored in this buffer. 	
in	data_size 	size of data to be encrypted/decrypted. 	
Return values:
TSS2_RC_SUCCESS 	on success, or TSS2_ESYS_RC_BAD_VALUE and 	
TSS2_ESYS_RC_BAD_REFERENCE 	for invalid parameters. 	

Internal ESAPI utility functions.
Data Structures
struct HASH_TAB_ITEM

Detailed Description

Todo:
Description and Documentat of functions

Data Structure Documentation
struct HASH_TAB_ITEM
An entry in a cpHash or rpHash table. 
Data Fields
TPM2_ALG_ID alg
size_t size
uint8_t digest [sizeof(TPMU_HA)]

Field Documentation
TPM2_ALG_ID alg
The hash algorithm. 
uint8_t digest[sizeof(TPMU_HA)]
The digest. 
size_t size
The digest size. 

Testing
Modules
Esys-Testing
For every integration test a function with a name corresponding to the name of the source code file of the test is created: test_esys_<test_name>(ESYS_CONTEXT * esys_context). This function is called by the standard function test_invoke_esapi in every integration test. Fapi-Testing

Detailed Description
Description of the test plan. 

Esys-Testing

For every integration test a function with a name corresponding to the name of the source code file of the test is created: test_esys_<test_name>(ESYS_CONTEXT * esys_context). This function is called by the standard function test_invoke_esapi in every integration test. 
int test_esys_evict_control_serialization (ESYS_CONTEXT *esys_context)
int test_esys_lock (ESYS_CONTEXT *esys_context)
int test_esys_get_capability (ESYS_CONTEXT *esys_context)
int test_esys_zgen_2phase (ESYS_CONTEXT *esys_context)
int test_esys_verify_signature (ESYS_CONTEXT *esys_context)
int test_esys_import (ESYS_CONTEXT *esys_context)
int test_esys_policy_regression (ESYS_CONTEXT *esys_context)
int test_esys_policy_authorize_nv_opt (ESYS_CONTEXT *esys_context)
int test_esys_policy_physical_presence_opt (ESYS_CONTEXT *esys_context)
int test_esys_policy_template_opt (ESYS_CONTEXT *esys_context)
int test_esys_policy_ticket (ESYS_CONTEXT *esys_context)
int test_esys_change_eps (ESYS_CONTEXT *esys_context)
int test_esys_policy_nv_undefine_special (ESYS_CONTEXT *esys_context)
int test_esys_create_fail (ESYS_CONTEXT *esys_context)
int test_esys_testparms (ESYS_CONTEXT *esys_context)
int test_esys_create_password_auth (ESYS_CONTEXT *esys_context)
int test_esys_stir_random (ESYS_CONTEXT *esys_context)
int test_esys_clockset (ESYS_CONTEXT *esys_context)
int test_esys_clear_control (ESYS_CONTEXT *esys_context)
int test_esys_nv_ram_extend_index (ESYS_CONTEXT *esys_context)
int test_esys_save_and_load_context (ESYS_CONTEXT *esys_context)
int test_esys_encrypt_decrypt (ESYS_CONTEXT *esys_context)
int test_esys_createloaded (ESYS_CONTEXT *esys_context)
int test_esys_audit (ESYS_CONTEXT *esys_context)
int test_esys_policy_password (ESYS_CONTEXT *esys_context)
int test_esys_tpm_tests (ESYS_CONTEXT *esys_context)
int test_esys_certify (ESYS_CONTEXT *esys_context)
int test_esys_pcr_basic (ESYS_CONTEXT *esys_context)
int test_esys_quote (ESYS_CONTEXT *esys_context)
int test_esys_tr_getName_hierarchy (ESYS_CONTEXT *ectx)
int test_esys_field_upgrade (ESYS_CONTEXT *esys_context)
int test_esys_unseal_password_auth (ESYS_CONTEXT *esys_context)
int test_esys_nv_ram_set_bits (ESYS_CONTEXT *esys_context)
int test_esys_nv_certify (ESYS_CONTEXT *esys_context)
int test_esys_ecdh_keygen (ESYS_CONTEXT *esys_context)
int test_esys_tr_fromTpmPublic_key (ESYS_CONTEXT *ectx)
int test_esys_ecdh_zgen (ESYS_CONTEXT *esys_context)
int test_esys_certify_creation (ESYS_CONTEXT *esys_context)
int test_esys_nv_ram_counter (ESYS_CONTEXT *esys_context)
int test_esys_event_sequence_complete (ESYS_CONTEXT *esys_context)
int test_esys_create_session_auth (ESYS_CONTEXT *esys_context)
int test_esys_tr_fromTpmPublic_nv (ESYS_CONTEXT *ectx)
int test_esys_create_primary_hmac (ESYS_CONTEXT *esys_context)
int test_esys_firmware_read (ESYS_CONTEXT *esys_context)
int test_esys_hmacsequencestart (ESYS_CONTEXT *esys_context)
int test_esys_hmac (ESYS_CONTEXT *esys_context)
int test_esys_ecc_parameters (ESYS_CONTEXT *esys_context)
int test_esys_hierarchychangeauth (ESYS_CONTEXT *esys_context)
int test_esys_pcr_auth_value (ESYS_CONTEXT *esys_context)
int test_esys_nv_ram_ordinary_index (ESYS_CONTEXT *esys_context)
int test_esys_duplicate (ESYS_CONTEXT *esys_context)
int test_esys_rsa_encrypt_decrypt (ESYS_CONTEXT *esys_context)
int test_esys_set_algorithm_set (ESYS_CONTEXT *esys_context)
int test_esys_object_changeauth (ESYS_CONTEXT *esys_context)
int test_esys_pp_commands (ESYS_CONTEXT *esys_context)
int test_esys_clear (ESYS_CONTEXT *esys_context)
int test_esys_policy_authorize (ESYS_CONTEXT *esys_context)
int test_esys_get_time (ESYS_CONTEXT *esys_context)
int test_esys_make_credential (ESYS_CONTEXT *esys_context)
int test_esys_commit (ESYS_CONTEXT *esys_context)
int test_esys_policy_nv_changeauth (ESYS_CONTEXT *esys_context)

Detailed Description
For every integration test a function with a name corresponding to the name of the source code file of the test is created: test_esys_<test_name>(ESYS_CONTEXT * esys_context). This function is called by the standard function test_invoke_esapi in every integration test. 
For some tests different test cases can be created with compiler defines to avoid duplicate code in different test cases.The following defines are used and listed in the function's documentation if used:
TEST_ECC Create an ECC key instead of an RSA key.
TEST_SESSION Use session authentication instead of password authentication.
TEST_READ_LOCK Activate test of Esys_NV_ReadLock.
TEST_WRITE_LOCK Activate test of Esys_NV_WriteLock.
TEST_XOR_OBFUSCATION Use xor obfuscation for parameter encryption.
TEST_AES_ENCRYPTION Use AES for parameter encryption.
TEST_BOUND_SESSION Run test with a bound session.
The ESAPI command calls which are used in a test are listed in the function's documentation and are marked according to the PC Client Profile Revision 01.03 v22:
(M) Mandatory
(O) Optional
(F) Commands added after TPM Specification Rev. 1.16 is integrated. 

Function Documentation
test_esys_audit (ESYS_CONTEXT *  esys_context)
This test is intended to test the ESYS audit commands.
First a key for signing the audit digest is computed. A audit session is started, and for the command GetCapability the command audit digest and the session audit digest is computed. (Esys_GetCommandAuditDigest, Esys_GetSessionAuditDigest). In the last test the audit hash alg is changed with Esys_SetCommandCodeAuditStatus.
Note:  platform authorization needed.
Tested ESYS commands:
Esys_CreatePrimary() (M)
Esys_FlushContext() (M)
Esys_GetCapability() (M)
Esys_GetCommandAuditDigest() (O)
Esys_GetSessionAuditDigest() (M)
Esys_SetCommandCodeAuditStatus() (O)
Esys_StartAuthSession() (M)
Esys_StartAuthSession() (M)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SKIP 		
EXIT_SUCCESS 		
test_esys_certify (ESYS_CONTEXT *  esys_context)
This test is intended to test the command Esys_Certify.
We create a RSA primary signing key which will be used as signing key and as object for the certify command.
Tested ESYS commands:
Esys_Certify() (M)
Esys_CreatePrimary() (M)
Esys_FlushContext() (M)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_certify_creation (ESYS_CONTEXT *  esys_context)
This test is intended to test the command Esys_CertifyCreation.
We create a RSA primary signing key which will be used as signing key and as object for the certify creation.
Tested ESYS commands:
Esys_CertifyCreation() (M)
Esys_CreatePrimary() (M)
Esys_FlushContext() (M)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_change_eps (ESYS_CONTEXT *  esys_context)
Test the ESYS function Esys_ChangeEPS.
Note:  platform authorization needed.
Tested ESYS commands:
Esys_ChangeEPS() (O)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SKIP 		
EXIT_SUCCESS 		
test_esys_clear (ESYS_CONTEXT *  esys_context)
Test of the ESYS function Esys_Clear.
Tested ESYS commands:
Esys_Clear() (M)
Esys_FlushContext() (M)
Esys_StartAuthSession() (M)
Used compiler defines: TEST_SESSION
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_clear_control (ESYS_CONTEXT *  esys_context)
Test the ESYS function Esys_ClearControl.
The clear command will be disabled and with Esys_Clear it will be checked whether clear is disabled.
Tested ESYS commands:
Esys_Clear() (M)
Esys_ClearControl() (M)
*Note:  platform authorization needed.
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_clockset (ESYS_CONTEXT *  esys_context)
Test the ESYS function Esys_ClockSet and Esys_ReadClock.
Note:  platform authorization needed.
Tested ESYS commands:
Esys_ClockRateAdjust() (M)
Esys_ClockSet() (M)
Esys_ReadClock() (M)
Used compiler defines: TEST_SESSION
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SKIP 		
EXIT_SUCCESS 		
test_esys_commit (ESYS_CONTEXT *  esys_context)
This test is intended to test Esys_Commit. based on an ECC key created with Esys_CreatePrimary Esys_Commit is called with a point from the primary key.
Tested ESYS commands:
Esys_Commit() (M)
Esys_CreatePrimary() (M)
Esys_FlushContext() (M)
Esys_StartAuthSession() (M)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SKIP 		
EXIT_SUCCESS 		
test_esys_create_fail (ESYS_CONTEXT *  esys_context)
This test is intended to test password authentication.
We start by creating a primary key (Esys_CreatePrimary). Based in the primary several calls with NULL parameters, which should not be allowed, will be tested.
Tested ESYS commands:
Esys_Create() (M)
Esys_CreatePrimary() (M)
Esys_FlushContext() (M)
Used compiler defines: TEST_ECC
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_create_password_auth (ESYS_CONTEXT *  esys_context)
This test is intended to test password authentication for the ESYS command Create.
We start by creating a primary key (Esys_CreatePrimary). Based in the primary a second key with an password define in the sensitive area will be created. This key will be loaded and will be used as parent to create a third key. Password authentication will be used to create this key.
Tested ESYS commands:
Esys_Create() (M)
Esys_CreatePrimary() (M)
Esys_FlushContext() (M)
Esys_Load() (M)
Used compiler defines: TEST_ECC
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_create_primary_hmac (ESYS_CONTEXT *  esys_context)
This test is intended to test Esys_CreatePrimary with hmac verification.
The test can be executed with RSA or ECC keys. ECC will be used if ECC is defined.
Tested ESYS commands:
Esys_CreatePrimary() (M)
Esys_FlushContext() (M)
Esys_StartAuthSession() (M)
Used compiler defines: TEST_ECC
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_create_session_auth (ESYS_CONTEXT *  esys_context)
This test is intended to test parameter encryption/decryption, session management, hmac computation, and session key generation.
We start by creating a primary key (Esys_CreatePrimary). The primary key will be used as tpmKey for Esys_StartAuthSession. Parameter encryption and decryption will be activated for the session. The session will be used to Create a second key by Eys_Create (with password) This key will be Loaded to and a third key will be created with the second key as parent key (Esys_Create). The type of encryptin can be selected by the compiler variables (-D option): TEST_XOR_OBFUSCATION or TEST_AES_ENCRYPTION. Secret exchange with a ECC key can be activated with the compiler variable -D TEST_ECC.
Tested ESYS commands:
Esys_ContextLoad() (M)
Esys_ContextSave() (M)
Esys_Create() (M)
Esys_CreatePrimary() (M)
Esys_FlushContext() (M)
Esys_Load() (M)
Esys_StartAuthSession() (M)
Used compiler defines: TEST_ECC, TEST_AES_ENCRYPTION, TEST_BOUND_SESSION TEST_XOR_OBFUSCATION
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_createloaded (ESYS_CONTEXT *  esys_context)
This test is intended to test the ESYS command CreateLoaded.
We start by creating a primary key (Esys_CreatePrimary). This primary key will be used as parent key for CreateLoaded.
Tested ESYS commands:
Esys_CreateLoaded() (F)
Esys_CreatePrimary() (M)
Esys_FlushContext() (M)
Esys_StartAuthSession() (M)
Esys_TR_GetName() (M)
Esys_TR_ReadPublic() (M)
Used compiler defines: TEST_SESSION
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SKIP 		
EXIT_SUCCESS 		
test_esys_duplicate (ESYS_CONTEXT *  esys_context)
This test is intended to test the ESYS commands Duplicate and Rewrap.
We start by creating a primary key (Esys_CreatePrimary). This primary key will be used as parent key for the Duplicate command. A second primary key will be the parent key of the duplicated key. In the last step the key is rewrapped with the first primary key as parent key.
Tested ESYS commands:
Esys_Create() (M)
Esys_CreatePrimary() (M)
Esys_Duplicate() (M)
Esys_FlushContext() (M)
Esys_Load() (M)
Esys_PolicyAuthValue() (M)
Esys_PolicyCommandCode() (M)
Esys_PolicyGetDigest() (M)
Esys_ReadPublic() (M)
Esys_Rewrap() (O)
Esys_StartAuthSession() (M)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SKIP 		
EXIT_SUCCESS 		
test_esys_ecc_parameters (ESYS_CONTEXT *  esys_context)
Test the ESYS function Esys_ECC_Parameters.
Tested ESYS commands:
Esys_ECC_Parameters() (M)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SKIP 		
EXIT_SUCCESS 		
test_esys_ecdh_keygen (ESYS_CONTEXT *  esys_context)
This test is intended to test Esys_ECDH_KeyGen based on an ECC key created with Esys_CreatePrimary.
Tested ESYS commands:
Esys_CreatePrimary() (M)
Esys_ECDH_KeyGen() (M)
Esys_FlushContext() (M)
Esys_StartAuthSession() (M)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_ecdh_zgen (ESYS_CONTEXT *  esys_context)
This test is intended to test Esys_ECDH_ZGen. based on an ECC key created with Esys_CreatePrimary and a dummy ECC point.
Tested ESYS commands:
Esys_CreatePrimary() (M)
Esys_ECDH_ZGen() (M)
Esys_FlushContext() (M)
Esys_StartAuthSession() (M)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_encrypt_decrypt (ESYS_CONTEXT *  esys_context)
This test is intended to test the ESYS function Esys_EncryptDecrypt.
First a primary key is generated. This key will be uses as parent fo a symmetric key, which will be used to encrypt and decrypt a tpm2b. The result will be compared.
Tested ESYS commands:
Esys_Create() (M)
Esys_CreatePrimary() (M)
Esys_EncryptDecrypt() (O)
Esys_FlushContext() (M)
Esys_Load() (M)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SKIP 		
EXIT_SUCCESS 		
test_esys_event_sequence_complete (ESYS_CONTEXT *  esys_context)
Test the ESYS commands HashSequenceStart, SequenceUpdate, and EventSequenceComplete.
Tested ESYS commands:
Esys_EventSequenceComplete() (M)
Esys_HashSequenceStart() (M)
Esys_SequenceUpdate() (M)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
< enforce event Sequence 
test_esys_evict_control_serialization (ESYS_CONTEXT *  esys_context)
This test is intended to test EvictControl and ESYS Serialization.
We start by creating a primary key (Esys_CreatePrimary). Based on this key a persistent object is created (Esys_EvictControl). The resource of this object will be serialized and deserialized with the corresponding ESYS functions (Esys_TR_Serialize, Esys_TR_Deserialize). To check whether the deserialization was successful a new object will be created with the handle returned by the deserialize function.
Tested ESYS commands:
Esys_Create() (M)
Esys_CreatePrimary() (M)
Esys_EvictControl() (M)
Esys_FlushContext() (M)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_field_upgrade (ESYS_CONTEXT *  esys_context)
Test the ESYS function Esys_FieldUpgradeStart and Esys_FieldUpgradeData.
Tested ESYS commands:
Esys_FieldUpgradeData() (O)
Esys_FieldUpgradeStart() (O)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SKIP 		
EXIT_SUCCESS 		
test_esys_firmware_read (ESYS_CONTEXT *  esys_context)
Test the ESYS function Esys_FirmwareRead.
Tested ESYS commands:
Esys_FirmwareRead() (O)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SKIP 		
EXIT_SUCCESS 		
test_esys_get_capability (ESYS_CONTEXT *  esys_context)
This test is intended to test the ESYS get capability command.
Tested ESYS commands:
Esys_GetCapability() (M)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_get_time (ESYS_CONTEXT *  esys_context)
This test is intended to test the GetTime command with password authentication.
We create a RSA primary signing key which will be used for signing.
Tested ESYS commands:
Esys_CreatePrimary() (M)
Esys_FlushContext() (M)
Esys_GetTime() (O)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SKIP 		
EXIT_SUCCESS 		
test_esys_hierarchychangeauth (ESYS_CONTEXT *  esys_context)
This test is intended to test the change of an authorization value of a hierarchy.
To check whether the change was successful a primary key is created with the handle of this hierarchy and the new authorization. Also second primary is created after a call of Esys_TR_SetAuth with the new auth value.
Tested ESYS commands:
Esys_CreatePrimary() (M)
Esys_FlushContext() (M)
Esys_HierarchyChangeAuth() (M)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_hmac (ESYS_CONTEXT *  esys_context)
This test is intended to test the ESYS command Esys_HMAC with password authentication.
We create a symmetric HMAC key signing key which will be used for signing. This key will be used to create the HMAC for a test buffer.
Tested ESYS commands:
Esys_CreatePrimary() (M)
Esys_FlushContext() (M)
Esys_HMAC() (O)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_hmacsequencestart (ESYS_CONTEXT *  esys_context)
Test the ESYS commands: HMAC_Start, SequenceUpdate, and SequenceComplete.
The HMAC key is created by using Esys_CreatePrimary.
Tested ESYS commands:
Esys_CreatePrimary() (M)
Esys_FlushContext() (M)
Esys_HMAC_Start() (M)
Esys_SequenceComplete() (M)
Esys_SequenceUpdate() (M)
Esys_StartAuthSession() (M)
Used compiler defines: TEST_SESSION
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_import (ESYS_CONTEXT *  esys_context)
This test is intended to test the ESYS commands Duplicate and Import.
We start by creating a primary key (Esys_CreatePrimary). This primary key will be used as parent key for the Duplicate command. A second primary key will be the parent key of the duplicated key. In the last step the key is imported with the first primary key as parent key (Esys_Import).
Tested ESYS commands:
Esys_Create() (M)
Esys_CreatePrimary() (M)
Esys_Duplicate() (M)
Esys_FlushContext() (M)
Esys_Import() (M)
Esys_Load() (M)
Esys_PolicyAuthValue() (M)
Esys_PolicyCommandCode() (M)
Esys_PolicyGetDigest() (M)
Esys_ReadPublic() (M)
Esys_StartAuthSession() (M)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_lock (ESYS_CONTEXT *  esys_context)
Test the ESYS functions related to TPM locks.
Note:  platform authorization needed.
Tested ESYS commands:
Esys_DictionaryAttackLockReset() (M)
Esys_DictionaryAttackParameters() (M)
Esys_NV_GlobalWriteLock() (O)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SKIP 		
EXIT_SUCCESS 		
test_esys_make_credential (ESYS_CONTEXT *  esys_context)
This test is intended to test the function Esys_MakeCredential We start by creating a primary key (Esys_CreatePrimary).
Based in the primary a second key will be created. The public part of the key will be loaded by the function Esys_LoadExternal. A credential will be encrypted with this key with the command Esys_MakeCredential. The credential will be activated with Esys_ActivateCredential.
Tested ESYS commands:
Esys_ActivateCredential() (M)
Esys_Create() (M)
Esys_CreatePrimary() (M)
Esys_FlushContext() (M)
Esys_Load() (M)
Esys_LoadExternal() (M)
Esys_MakeCredential() (M)
Esys_ReadPublic() (M)
Esys_StartAuthSession() (M)
Used compiler defines: TEST_SESSION
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_nv_certify (ESYS_CONTEXT *  esys_context)
This test is intended to test the command Esys_NV_Certify.
We create a RSA primary signing key which will be used as signing key for the NV data.
Tested ESYS commands:
Esys_CreatePrimary() (M)
Esys_FlushContext() (M)
Esys_NV_Certify() (O)
Esys_NV_DefineSpace() (M)
Esys_NV_UndefineSpace() (M)
Esys_NV_Write() (M)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SKIP 		
EXIT_SUCCESS 		
test_esys_nv_ram_counter (ESYS_CONTEXT *  esys_context)
This test is intended to test the definition of a counter in NV ram and to test the ESYS NV_Increment function.
Tested ESYS commands:
Esys_FlushContext() (M)
Esys_NV_DefineSpace() (M)
Esys_NV_Increment() (M)
Esys_NV_Read() (M)
Esys_NV_ReadPublic() (M)
Esys_NV_UndefineSpace() (M)
Esys_StartAuthSession() (M)
Used compiler defines: TEST_SESSION
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_nv_ram_extend_index (ESYS_CONTEXT *  esys_context)
This test is intended to test the ESYS nv define space, nv extend, and nv read command. The names stored in the ESYS resource are compared with the names delivered from the TPM by the command ReadPublic.
Tested ESYS commands:
Esys_FlushContext() (M)
Esys_NV_DefineSpace() (M)
Esys_NV_Extend() (M)
Esys_NV_Read() (M)
Esys_NV_ReadPublic() (M)
Esys_NV_UndefineSpace() (M)
Esys_StartAuthSession() (M)
Used compiler defines: TEST_SESSION
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_nv_ram_ordinary_index (ESYS_CONTEXT *  esys_context)
This test is intended to test the ESYS commands nv define space, nv write, nv read command, nv lock write and nv lock read, and nv undefine.
The names stored in the ESYS resource are compared with the names delivered from the TPM by the command ReadPublic. only one of the tests NV_ReadLock and NV_WriteLock can be activated by the defines TEST_READ_LOCK and TEST_WRITE_LOCK (-D option)
Tested ESYS commands:
Esys_FlushContext() (M)
Esys_NV_DefineSpace() (M)
Esys_NV_Read() (M)
Esys_NV_ReadLock() (M)
Esys_NV_ReadPublic() (M)
Esys_NV_UndefineSpace() (M)
Esys_NV_Write() (M)
Esys_NV_WriteLock() (M)
Esys_StartAuthSession() (M)
Used compiler defines: TEST_READ_LOCK TEST_SESSION TEST_WRITE_LOCK
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_nv_ram_set_bits (ESYS_CONTEXT *  esys_context)
This test is intended to test the definition of a bit field in NV ram and to test the ESYS NV_SetBits function.
Tested ESYS commands:
Esys_FlushContext() (M)
Esys_NV_DefineSpace() (M)
Esys_NV_Read() (M)
Esys_NV_ReadPublic() (M)
Esys_NV_SetBits() (M)
Esys_NV_UndefineSpace() (M)
Esys_StartAuthSession() (M)
Used compiler defines: TEST_SESSION
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_object_changeauth (ESYS_CONTEXT *  esys_context)
This test is intended to test the ESYS command ObjectChangeAuth.
We start by creating a primary key (Esys_CreatePrimary). The auth value for this primary will be changed.
Tested ESYS commands:
Esys_Create() (M)
Esys_CreatePrimary() (M)
Esys_FlushContext() (M)
Esys_Load() (M)
Esys_ObjectChangeAuth() (M)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_pcr_auth_value (ESYS_CONTEXT *  esys_context)
Test the commands Esys_PCR_SetAuthValue and Esys_PCR_SetAuthPolicy.
Note:  platform authorization needed.
Tested ESYS commands:
Esys_PCR_SetAuthPolicy() (O)
Esys_PCR_SetAuthValue() (O)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SKIP 		
EXIT_SUCCESS 		
test_esys_pcr_basic (ESYS_CONTEXT *  esys_context)
Test the basic commands for PCR processing.
Note:  platform authorization needed.
Tested ESYS commands:
Esys_PCR_Allocate() (M)
Esys_PCR_Event() (M)
Esys_PCR_Extend() (M)
Esys_PCR_Read() (M)
Esys_PCR_Reset() (M)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SKIP 		
EXIT_SUCCESS 		
test_esys_policy_authorize (ESYS_CONTEXT *  esys_context)
This test is intended to test the ESYS policy authorization.
Tested ESYS commands:
Esys_CreatePrimary() (M)
Esys_FlushContext() (M)
Esys_PolicyAuthorize() (M)
Esys_PolicyGetDigest() (M)
Esys_ReadPublic() (M)
Esys_StartAuthSession() (M)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_policy_authorize_nv_opt (ESYS_CONTEXT *  esys_context)
This test is intended to test the ESYS policy commands, not tested in other test cases. When possoble the commands are tested with a trial session and the policy digest is compared with the expected digest.
Tested ESYS commands:
Esys_FlushContext() (M)
Esys_NV_DefineSpace() (M)
Esys_PolicyAuthorizeNV() (F)
Esys_PolicyNV() (M)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SKIP 		
EXIT_SUCCESS 		
test_esys_policy_nv_changeauth (ESYS_CONTEXT *  esys_context)
This test is intended to test the ESYS commands PolicyAuthValue, PolicyCommandCode, Esys_PolicyGetDigest, and NV_ChangeAuth.
First in a trial session the policy value to ensure that the auth value is included in the policy session used for NV_ChangeAuth is computed. A NV ram space with this policy is defined afterwards. With a real policy session the auth value of this NV ram space will be changed.
Tested ESYS commands:
Esys_FlushContext() (M)
Esys_NV_ChangeAuth() (M)
Esys_NV_DefineSpace() (M)
Esys_NV_UndefineSpace() (M)
Esys_PolicyAuthValue() (M)
Esys_PolicyCommandCode() (M)
Esys_PolicyGetDigest() (M)
Esys_StartAuthSession() (M)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_policy_nv_undefine_special (ESYS_CONTEXT *  esys_context)
This test is intended to test the ESYS command Esys_NV_UndefineSpaceSpecial, The NV space attributes TPMA_NV_PLATFORMCREATE and TPMA_NV_POLICY_DELETE have to be set.
A policy has to be defined for the command UndefineSpaceSpecial. The special handling whether the auth value is not used in the HMAC response verification will be checked.
Note:  platform authorization needed.
Tested ESYS commands:
Esys_FlushContext() (M)
Esys_NV_DefineSpace() (M)
Esys_NV_UndefineSpaceSpecial() (M)
Esys_PolicyAuthValue() (M)
Esys_PolicyCommandCode() (M)
Esys_PolicyGetDigest() (M)
Esys_StartAuthSession() (M)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SKIP 		
EXIT_SUCCESS 		
< Undefine will only possible with policy 
test_esys_policy_password (ESYS_CONTEXT *  esys_context)
This test is intended to test the ESYS command PolicyPassword.
First in a trial session the policy value to ensure that auth value is included in the policy session used for authorization is computed. We start by creating a primary key (Esys_CreatePrimary) with this policy value and a certain authorization. Than a second key it created with a PoliyPassword policy session.
Tested ESYS commands:
Esys_Create() (M)
Esys_CreatePrimary() (M)
Esys_FlushContext() (M)
Esys_PolicyGetDigest() (M)
Esys_PolicyPassword() (M)
Esys_StartAuthSession() (M)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_policy_physical_presence_opt (ESYS_CONTEXT *  esys_context)
This test is intended to test the ESYS policy commands, not tested in other test cases. When possoble the commands are tested with a trial session and the policy digest is compared with the expected digest.
Tested ESYS commands:
Esys_PolicyPhysicalPresence() (O)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SKIP 		
EXIT_SUCCESS 		
test_esys_policy_regression (ESYS_CONTEXT *  esys_context)
This test is intended to test the ESYS policy commands, not tested in other test cases. When possoble the commands are tested with a trial session and the policy digest is compared with the expected digest.
Tested ESYS commands:
Esys_FlushContext() (M)
Esys_NV_DefineSpace() (M)
Esys_NV_UndefineSpace() (M)
Esys_PolicyCounterTimer() (M)
Esys_PolicyDuplicationSelect() (M)
Esys_PolicyGetDigest() (M)
Esys_PolicyNV() (M)
Esys_PolicyNameHash() (M)
Esys_PolicyNvWritten() (M)
Esys_PolicyOR() (M)
Esys_PolicyPCR() (M)
Esys_PolicyPhysicalPresence() (O)
Esys_PolicyRestart() (M)
Esys_SetPrimaryPolicy() (M)
Esys_StartAuthSession() (M)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SKIP 		
EXIT_SUCCESS 		
test_esys_policy_template_opt (ESYS_CONTEXT *  esys_context)
This test is intended to test the ESYS policy commands, not tested in other test cases. When possoble the commands are tested with a trial session and the policy digest is compared with the expected digest.
Tested ESYS commands:
Esys_FlushContext() (M)
Esys_PolicyTemplate() (F)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SKIP 		
EXIT_SUCCESS 		
test_esys_policy_ticket (ESYS_CONTEXT *  esys_context)
This test is intended to test the ESYS policy commands related to signed authorization actions.
Esys_PolicySigned, Esys_PolicyTicket, and Esys_PolicySecret.
Tested ESYS commands:
Esys_CreatePrimary() (M)
Esys_FlushContext() (M)
Esys_HashSequenceStart() (M)
Esys_PolicySecret() (M)
Esys_PolicySigned() (M)
Esys_PolicyTicket() (O)
Esys_ReadPublic() (M)
Esys_SequenceComplete() (M)
Esys_SequenceUpdate() (M)
Esys_Sign() (M)
Esys_StartAuthSession() (M)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_pp_commands (ESYS_CONTEXT *  esys_context)
Test the ESYS function Esys_PP_Commands.
If the test requires physical presence, the test is skipped.
Note:  platform authorization needed.
Tested ESYS commands:
Esys_PP_Commands() (O)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SKIP 		
EXIT_SUCCESS 		
test_esys_quote (ESYS_CONTEXT *  esys_context)
This test is intended to test the quote command with password authentication.
We create a RSA primary signing key which will be used for signing.
Tested ESYS commands:
Esys_CreatePrimary() (M)
Esys_FlushContext() (M)
Esys_Quote() (M)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_rsa_encrypt_decrypt (ESYS_CONTEXT *  esys_context)
This test is intended to test RSA encryption / decryption. with password authentication. We create a RSA primary key (Esys_CreatePrimary) for every crypto action This key will be used for encryption/decryption in with the schemes: TPM2_ALG_NULL, TPM2_ALG_RSAES, and TPM2_ALG_OAEP
Tested ESYS commands:
Esys_CreatePrimary() (M)
Esys_FlushContext() (M)
Esys_RSA_Decrypt() (M)
Esys_RSA_Encrypt() (M)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_save_and_load_context (ESYS_CONTEXT *  esys_context)
This test is intended to test context save and load.
We start by creating a primary key (Esys_CreatePrimary). Based in the primary a second key with an password define in the sensitive area will be created. This key will be loaded and saved with the ContextSave command. After the key is flushed the key will be loaded again with ContextLoad and will be used to create a third key
Tested ESYS commands:
Esys_ContextLoad() (M)
Esys_ContextSave() (M)
Esys_Create() (M)
Esys_CreatePrimary() (M)
Esys_FlushContext() (M)
Esys_Load() (M)
Used compiler defines: TEST_ECC
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_set_algorithm_set (ESYS_CONTEXT *  esys_context)
Test the ESYS function Esys_SetAlgorithmSet.
Note:  platform authorization needed.
Tested ESYS commands:
Esys_SetAlgorithmSet() (O)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SKIP 		
EXIT_SUCCESS 		
test_esys_stir_random (ESYS_CONTEXT *  esys_context)
Test the ESYS function Esys_StirRandom.
Tested ESYS commands:
Esys_StirRandom() (M)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_testparms (ESYS_CONTEXT *  esys_context)
Test the ESYS function Esys_TestParms.
Tested ESYS commands:
Esys_TestParms() (M)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_tpm_tests (ESYS_CONTEXT *  esys_context)
Test the ESYS functions for TPM tests.
Tested ESYS commands:
Esys_GetTestResult() (M)
Esys_IncrementalSelfTest() (M)
Esys_SelfTest() (M)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_tr_fromTpmPublic_key (ESYS_CONTEXT *  ectx)
This tests the Esys_TR_FromTPMPublic and Esys_TR_GetName functions by creating an NV Index and then attempting to retrieve an ESYS_TR object for it. Then we call Esys_TR_GetName to see if the correct public name has been retrieved.
Tested ESYS commands:
Esys_CreatePrimary() (M)
Esys_EvictControl() (M)
Esys_FlushContext() (M)
Esys_ReadPublic() (M)
Parameters:
in,out	ectx 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_tr_fromTpmPublic_nv (ESYS_CONTEXT *  ectx)
This tests the Esys_TR_FromTPMPublic and Esys_TR_GetName functions by creating an NV Index and then attempting to retrieve an ESYS_TR object for it. Then we call Esys_TR_GetName to see if the correct public name has been retrieved.
Tested ESYS commands:
Esys_NV_DefineSpace() (M)
Esys_NV_ReadPublic() (M)
Esys_NV_UndefineSpace() (M)
Parameters:
in,out	ectx 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_tr_getName_hierarchy (ESYS_CONTEXT *  ectx)
This tests the Esys_TR_FromTPMPublic and Esys_TR_GetName functions by creating an NV Index and then attempting to retrieve an ESYS_TR object for it. Then we call Esys_TR_GetName to see if the correct public name has been retrieved.
Tested ESYS commands:
Parameters:
in,out	ectx 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_unseal_password_auth (ESYS_CONTEXT *  esys_context)
This test is intended to test the unseal operation for the ESYS command Unseal.
We start by creating a primary key (Esys_CreatePrimary). Based on the primary key a second key with a password and the to be sealed data defined in the sensitive area will be created (Esys_Create). This key will be loaded and the unseal command (Esys_Unseal) will be used to retrieve the sealed data.
Tested ESYS commands:
Esys_Create() (M)
Esys_CreatePrimary() (M)
Esys_FlushContext() (M)
Esys_Load() (M)
Esys_Unseal() (M)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_verify_signature (ESYS_CONTEXT *  esys_context)
This test is intended to test the ESYS signing and signature verification.
Tested ESYS commands:
Esys_CreatePrimary() (M)
Esys_FlushContext() (M)
Esys_ReadPublic() (M)
Esys_Sign() (M)
Esys_VerifySignature() (M)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_esys_zgen_2phase (ESYS_CONTEXT *  esys_context)
This test is intended to test Esys_ECDH_ZGen.
The test is based on an ECC key created with Esys_CreatePrimary and data produced by the command Esys_EC_Ephemeral.
Tested ESYS commands:
Esys_CreatePrimary() (M)
Esys_ECDH_ZGen() (M)
Esys_EC_Ephemeral() (F)
Esys_FlushContext() (M)
Esys_StartAuthSession() (M)
Esys_ZGen_2Phase() (O)
Parameters:
in,out	esys_context 	The ESYS_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SKIP 		
EXIT_SUCCESS 		

Feature API
Modules
Fapi_Initialize
Fapi_Finalize
Fapi_GetTcti
Fapi_GetPollHandles
Fapi_Free
Fapi_GetInfo
Fapi_Provision
Fapi_GetPlatformCertificates
Fapi_GetEsysBlobs
Fapi_GetRandom
Fapi_Import
Fapi_List
Fapi_Delete
Fapi_ChangeAuth
Fapi_SetDescription
Fapi_GetDescription
Fapi_SetAppData
Fapi_GetAppData
Fapi_GetTpmBlobs
Fapi_CreateKey
Fapi_Sign
Fapi_VerifySignature
Fapi_Encrypt
Fapi_Decrypt
Fapi_SetCertificate
Fapi_GetCertificate
Fapi_ExportKey
Fapi_CreateSeal
Fapi_Unseal
Fapi_ExportPolicy
Fapi_AuthorizePolicy
Fapi_WriteAuthorizeNv
Fapi_PcrRead
Fapi_PcrExtend
Fapi_Quote
Fapi_VerifyQuote
Fapi_CreateNv
Fapi_NvRead
Fapi_NvWrite
Fapi_NvExtend
Fapi_NvIncrement
Fapi_NvSetBits
Fapi_SetAuthCB
Fapi_SetBranchCB
Fapi_SetSignCB
Internals of Feature API
Typedefs
typedef struct FAPI_CONTEXT FAPI_CONTEXT

Detailed Description
Feature API (FAPI) as described in the TSS 2.0 Feature API (FAPI) Specification. This API provides a very abstract view on TPM functionalities most suitable for 80 percent of applications. In mostly uses standard types in its parameter list. Policies are encoded in JSON, whereas most key material is encoded as PEM. Both the synchronous and asynchronous API are exposed through a single library: libtss2-fapi. In order to perform an asynchronous invocation of FAPI functions, the following code serves as a template: do { r = Fapi_GetPollHandles(fc, &ph, &nph); if (r == TSS2_RC_SUCCESS) { poll(ph, nph, -1); Fapi_Free(ph); } r = Fapi_*_Finish(fc, ...); } while (r == TSS2_FAPI_RC_TRY_AGAIN); 

Typedef Documentation
FAPI_CONTEXT
Reference to the FAPI_CONTEXT that holds data for the connection to the TPM as well as the metadata for TPM Resource as well as links to the key- and policy store or key material for encrypted sessions. 

Fapi_Initialize
Functions
TSS2_RC Fapi_Initialize (FAPI_CONTEXT **context, char const *uri)
TSS2_RC Fapi_Initialize_Async (FAPI_CONTEXT **context, char const *uri)
TSS2_RC Fapi_Initialize_Finish (FAPI_CONTEXT **context)

Detailed Description
FAPI functions to invoke Initialize either as one-call or in an asynchronous manner. 

Function Documentation
Fapi_Initialize (FAPI_CONTEXT **  context, char const *  uri)
One-Call function for Fapi_Initialize
Initializes a FAPI_CONTEXT that holds all the state and metadata information during an interaction with the TPM.
Parameters:
out	context 	The FAPI_CONTEXT 	
in	uri 	Unused in this version of the FAPI. Must be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_VALUE 	if uri is not NULL. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_PATH 	if a path is used in inappropriate context or contains illegal characters. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
Fapi_Initialize_Async (FAPI_CONTEXT **  context, char const *  uri)
Asynchronous function for Fapi_Initialize
Initializes a FAPI_CONTEXT that holds all the state and metadata information during an interaction with the TPM.
Call Fapi_Initialize to finish the execution of this command.
Parameters:
out	context 	The FAPI_CONTEXT 	
in	uri 	Unused in this version of the FAPI. Must be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_VALUE 	if uri is not NULL. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
Fapi_Initialize_Finish (FAPI_CONTEXT **  context)
Asynchronous finish function for Fapi_Initialize
This function should be called after a previous Fapi_Initialize_Async.
Parameters:
out	context 	The FAPI_CONTEXT	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_PATH 	if a path is used in inappropriate context or contains illegal characters. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	

Fapi_Finalize
Functions
void Fapi_Finalize (FAPI_CONTEXT **context)

Detailed Description
FAPI function to invoke Finalize. 

Function Documentation
Fapi_Finalize (FAPI_CONTEXT **  context)
One-Call function for Fapi_Finalize
Fapi_Finalize() finalizes a context by closing IPC/RPC connections and freeing its consumed memory.
Parameters:
in	context 	The FAPI_CONTEXT 	

Fapi_GetTcti
Functions
TSS2_RC Fapi_GetTcti (FAPI_CONTEXT *context, TSS2_TCTI_CONTEXT **tcti)

Detailed Description
FAPI function to retrieve the TSS2_TCTI_CONTEXT currently used by the corresponding FAPI_CONTEXT. 

Function Documentation
Fapi_GetTcti (FAPI_CONTEXT *  context, TSS2_TCTI_CONTEXT **  tcti)
One-Call function for Fapi_GetTcti
Fapi_GetTcti returns the TSS2_TCTI_CONTEXT currently used by the provided FAPI_CONTEXT. The purpose is to enable advanced access to the TPM that is currently being talked to. It is especially useful in combination with Fapi_GetTpmBlobs().
Note: The application must ensure that this TSS2_TCTI_CONTEXT is not being used in parallel to the processing of a FAPI command.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
out	tcti 	The TSS2_TCTI_CONTEXT used to talk to the current TPM.	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context, tcti is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was started in non-TPM mode. 	

Fapi_GetPollHandles
Functions
TSS2_RC Fapi_GetPollHandles (FAPI_CONTEXT *context, FAPI_POLL_HANDLE **handles, size_t *num_handles)

Detailed Description
FAPI function to retrieve the poll handles currently used by the corresponding FAPI_CONTEXT. 

Function Documentation
Fapi_GetPollHandles (FAPI_CONTEXT *  context, FAPI_POLL_HANDLE **  handles, size_t *  num_handles)
Retrieve handles for polling
Returns an array of handles that can be polled on to get notified when data from the TPM or from a disk operation is available.
The corresponding code should look similar to follows: do { r = Fapi_GetPollHandles(fc, &ph, &nph); if (r == TSS2_RC_SUCCESS) { poll(ph, nph, -1); Fapi_Free(ph); } r = Fapi_*_Finish(fc, ...); } while (r == TSS2_FAPI_RC_TRY_AGAIN);
Parameters:
in,out	context 	The FAPI_CONTEXT 	
out	handles 	An array of poll handle entries 	
out	num_handles 	The size of the array in handles	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or data is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has no asynchronous operation pending. 	
TSS2_FAPI_RC_NO_HANDLE 	if there are no handles to poll on 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	

Fapi_Free
Functions
void Fapi_Free (void *ptr)

Detailed Description
FAPI function to invoke Free. 

Function Documentation
Fapi_Free (void *  ptr)
Frees a FAPI allocated return buffer.
Fapi_Free is a helper function that is a wrapper around free(). This allows programs that are built using a different version of the C runtime to free memory that has been allocated by the esys library on Windows.
Parameters:
in	ptr 	A pointer to the object that is to be freed. 	

Fapi_GetInfo
Functions
TSS2_RC Fapi_GetInfo (FAPI_CONTEXT *context, char **info)
TSS2_RC Fapi_GetInfo_Async (FAPI_CONTEXT *context)
TSS2_RC Fapi_GetInfo_Finish (FAPI_CONTEXT *context, char **info)

Detailed Description
FAPI functions to invoke GetInfo either as one-call or in an asynchronous manner. 

Function Documentation
Fapi_GetInfo (FAPI_CONTEXT *  context, char **  info)
One-Call function for Fapi_GetInfo
Returns a UTF-8 encoded string that identifies the versions of FAPI, TPM, configurations and other relevant information.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
out	info 	The byte buffer for the information string	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or info is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
Fapi_GetInfo_Async (FAPI_CONTEXT *  context)
Asynchronous function for Fapi_GetInfo
Returns a UTF-8 encoded string that identifies the versions of FAPI, TPM, configurations and other relevant information.
Call Fapi_GetInfo_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
Fapi_GetInfo_Finish (FAPI_CONTEXT *  context, char **  info)
Asynchronous finish function for Fapi_GetInfo
This function should be called after a previous Fapi_GetInfo_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
out	info 	The byte buffer for the information string	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or info is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	

Fapi_Provision
Functions
TSS2_RC Fapi_Provision (FAPI_CONTEXT *context, char const *authValueEh, char const *authValueSh, char const *authValueLockout)
TSS2_RC Fapi_Provision_Async (FAPI_CONTEXT *context, char const *authValueEh, char const *authValueSh, char const *authValueLockout)
TSS2_RC Fapi_Provision_Finish (FAPI_CONTEXT *context)

Detailed Description
FAPI functions to invoke Provision either as one-call or in an asynchronous manner. 

Function Documentation
Fapi_Provision (FAPI_CONTEXT *  context, char const *  authValueEh, char const *  authValueSh, char const *  authValueLockout)
One-Call function for the initial FAPI provisioning.
Provisions a TSS with its TPM. This includes the setting of important passwords and policy settings as well as the readout of the EK and its certificate and the initialization of the system-wide keystore.
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
in	authValueEh 	The authorization value for the endorsement hierarchy. May be NULL 	
in	authValueSh 	The authorization value for the storage hierarchy. Should be NULL 	
in	authValueLockout 	The authorization value for lockout.	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_NO_CERT 	if no certificate was found for the computed EK. 	
TSS2_FAPI_RC_BAD_KEY 	if public key of the EK does not match the configured certificate or the configured fingerprint does not match the computed EK. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_PATH_ALREADY_EXISTS 	if the object already exists in object store. 	
Fapi_Provision_Async (FAPI_CONTEXT *  context, char const *  authValueEh, char const *  authValueSh, char const *  authValueLockout)
Asynchronous function for the initial FAPI provisioning.
Provisions a TSS with its TPM. This includes the setting of important passwords and policy settings as well as the readout of the EK and its certificate and the initialization of the system-wide keystore.
Call Fapi_Provision_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
in	authValueEh 	The authorization value for the endorsement hierarchy. May be NULL 	
in	authValueSh 	The authorization value for the storage hierarchy. Should be NULL 	
in	authValueLockout 	The authorization value for lockout.	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
Fapi_Provision_Finish (FAPI_CONTEXT *  context)
Asynchronous finish function for Fapi_Provision
This function should be called after a previous Fapi_Provision_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_NO_CERT 	if no certificate was found for the computed EK. 	
TSS2_FAPI_RC_BAD_KEY 	if public key of the EK does not match the configured certificate or the configured fingerprint does not match the computed EK. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_PATH_ALREADY_EXISTS 	if the object already exists in object store. 	
< Certificates will be stored at even address
< RSA template
< ECC template 

Fapi_GetPlatformCertificates
Functions
TSS2_RC Fapi_GetPlatformCertificates (FAPI_CONTEXT *context, uint8_t **certificates, size_t *certificatesSize)
TSS2_RC Fapi_GetPlatformCertificates_Async (FAPI_CONTEXT *context)
TSS2_RC Fapi_GetPlatformCertificates_Finish (FAPI_CONTEXT *context, uint8_t **certificates, size_t *certificatesSize)

Detailed Description
FAPI functions to invoke GetPlatformCertificates either as one-call or in an asynchronous manner. 

Function Documentation
Fapi_GetPlatformCertificates (FAPI_CONTEXT *  context, uint8_t **  certificates, size_t *  certificatesSize)
One-Call function for Fapi_GetPlatformCertificates
Platform certificates for TPM 2.0 can consist not only of a single certificate but a series of so-called delta certificates. This function returns the set of Platform certificates concatenated in a continuous buffer.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
out	certificates 	The platform certificates 	
out	certificatesSize 	The size of the buffer with the certificates. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or certificates is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_NO_CERT 	if an error did occur during certificate downloading. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
Fapi_GetPlatformCertificates_Async (FAPI_CONTEXT *  context)
Asynchronous function for Fapi_GetPlatformCertificates
Platform certificates for TPM 2.0 can consist not only of a single certificate but a series of so-called delta certificates. This function returns the set of Platform certificates concatenated in a continuous buffer.
Call Fapi_GetPlatformCertificates_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
Fapi_GetPlatformCertificates_Finish (FAPI_CONTEXT *  context, uint8_t **  certificates, size_t *  certificatesSize)
Asynchronous finish function for Fapi_GetPlatformCertificates
This function should be called after a previous Fapi_GetPlatformCertificates_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
out	certificates 	The platform certificates 	
out	certificatesSize 	The size of the buffer with the certificates. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or certificates is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_NO_CERT 	if an error did occur during certificate downloading. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	

Fapi_GetEsysBlobs
Functions
TSS2_RC Fapi_GetEsysBlob_Async (FAPI_CONTEXT *context, char const *path)
TSS2_RC Fapi_GetEsysBlob_Finish (FAPI_CONTEXT *context, uint8_t *type, uint8_t **data, size_t *length)

Detailed Description
FAPI functions to invoke GetEsysBlobs either as one-call or in an asynchronous manner. 

Function Documentation
Fapi_GetEsysBlob_Async (FAPI_CONTEXT *  context, char const *  path)
Asynchronous function for Fapi_GetEsysBlob
Prepares the reading of the blobs from keystore or TPM. Call Fapi_GetEsysBlob_Finish to finish the execution of this command.
Parameters:
in,out	context 	The ESAPI_CONTEXT 	
in	path 	The path of the FAPI object.	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or path is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if path does not map to a FAPI entity. 	
TSS2_FAPI_RC_NOT_DELETABLE 	if the entity is not deletable or the path is read-only. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
Fapi_GetEsysBlob_Finish (FAPI_CONTEXT *  context, uint8_t *  type, uint8_t **  data, size_t *  length)
Asynchronous finish function for Fapi_GetEsysBlob
This function should be called after a previous Fapi_GetEsysBlob_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
out	type 	The type of the returned blob.	
out	data 	The binary blob which can be used to create a ESAPI object. 	
out	length 	The size of the binary blob.	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	

Fapi_GetRandom
Functions
TSS2_RC Fapi_GetRandom (FAPI_CONTEXT *context, size_t numBytes, uint8_t **data)
TSS2_RC Fapi_GetRandom_Async (FAPI_CONTEXT *context, size_t numBytes)
TSS2_RC Fapi_GetRandom_Finish (FAPI_CONTEXT *context, uint8_t **data)

Detailed Description
FAPI functions to invoke GetRandom either as one-call or in an asynchronous manner. 

Function Documentation
Fapi_GetRandom (FAPI_CONTEXT *  context, size_t  numBytes, uint8_t **  data)
One-Call function for Fapi_GetRandom
Creates an array with a specified number of bytes. May execute the underlying TPM command multiple times if the requested number of bytes is too big.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	numBytes 	The number of bytes requested from the TPM 	
out	data 	The array of random bytes returned from the TPM	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or data is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_VALUE 	if numBytes is 0. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
Fapi_GetRandom_Async (FAPI_CONTEXT *  context, size_t  numBytes)
Asynchronous function for Fapi_GetRandom
Creates an array with a specified number of bytes. May execute the underlying TPM command multiple times if the requested number of bytes is too big.
Call Fapi_GetRandom_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	numBytes 	The number of bytes requested from the TPM	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_VALUE 	if numBytes is 0. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
Fapi_GetRandom_Finish (FAPI_CONTEXT *  context, uint8_t **  data)
Asynchronous finish function for Fapi_GetRandom
This function should be called after a previous Fapi_GetRandom_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
out	data 	The array of random bytes returned from the TPM	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or data is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	

Fapi_Import
Functions
TSS2_RC Fapi_Import (FAPI_CONTEXT *context, char const *path, char const *importData)
TSS2_RC Fapi_Import_Async (FAPI_CONTEXT *context, char const *path, char const *importData)
TSS2_RC Fapi_Import_Finish (FAPI_CONTEXT *context)

Detailed Description
FAPI functions to invoke Import either as one-call or in an asynchronous manner. 

Function Documentation
Fapi_Import (FAPI_CONTEXT *  context, char const *  path, char const *  importData)
One-Call function for Fapi_Import
Imports a JSON encoded policy, policy template or key and stores it at the given path.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	path 	the path to which the object is imported 	
in	importData 	The data that is imported	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context, path or importData is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	If path does not map to a FAPI policy or key. 	
TSS2_FAPI_RC_PATH_ALREADY_EXISTS 	if a policy or key already exists at path. 	
TSS2_FAPI_RC_BAD_VALUE 	if importData contains invalid data. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
Fapi_Import_Async (FAPI_CONTEXT *  context, char const *  path, char const *  importData)
Asynchronous function for Fapi_Import
Imports a JSON encoded policy, policy template or key and stores it at the given path.
Call Fapi_Import_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	path 	the path to which the object is imported 	
in	importData 	The data that is imported	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context, path or importData is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	If path does not map to a FAPI policy or key. 	
TSS2_FAPI_RC_PATH_ALREADY_EXISTS 	if a policy or key already exists at path. 	
TSS2_FAPI_RC_BAD_VALUE 	if importData contains invalid data. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
Fapi_Import_Finish (FAPI_CONTEXT *  context)
Asynchronous finish function for Fapi_Import
This function should be called after a previous Fapi_Import_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_PATH_ALREADY_EXISTS 	if the object already exists in object store. 	

Fapi_List
Functions
TSS2_RC Fapi_List (FAPI_CONTEXT *context, char const *searchPath, char **pathList)
TSS2_RC Fapi_List_Async (FAPI_CONTEXT *context, char const *searchPath)
TSS2_RC Fapi_List_Finish (FAPI_CONTEXT *context, char **pathList)

Detailed Description
FAPI functions to invoke List either as one-call or in an asynchronous manner. 

Function Documentation
Fapi_List (FAPI_CONTEXT *  context, char const *  searchPath, char **  pathList)
One-Call function for Fapi_List
Enumerates all objects in the metadatastore in a fiven path and returns them in a list of complete paths from the root with the values separated by colons.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	searchPath 	The path that identifies the root of the search 	
out	pathList 	A colon-separated list of all objects in the root path	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context, searchPath, pathlist is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if searchPath does not map to a FAPI entity. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
Fapi_List_Async (FAPI_CONTEXT *  context, char const *  searchPath)
Asynchronous function for Fapi_List
Enumerates all objects in the metadatastore in a fiven path and returns them in a list of complete paths from the root with the values separated by colons.
Call Fapi_List_Finish to finish the execution of this command.
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	searchPath 	The path that identifies the root of the search	
Return values:
TSS2_FAPI_RC_BAD_REFERENCE 	if context or searchPath is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if searchPath does not map to a FAPI entity. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
Fapi_List_Finish (FAPI_CONTEXT *  context, char **  pathList)
Asynchronous finish function for Fapi_List
This function should be called after a previous Fapi_List_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
out	pathList 	A colon-separated list of all objects in the root path	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or pathList is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	

Fapi_Delete
Functions
TSS2_RC Fapi_Delete (FAPI_CONTEXT *context, char const *path)
TSS2_RC Fapi_Delete_Async (FAPI_CONTEXT *context, char const *path)
TSS2_RC Fapi_Delete_Finish (FAPI_CONTEXT *context)

Detailed Description
FAPI functions to invoke Delete either as one-call or in an asynchronous manner. 

Function Documentation
Fapi_Delete (FAPI_CONTEXT *  context, char const *  path)
One-Call function for Fapi_Delete
Deletes a given key, policy or NV index from the system.
Parameters:
in,out	context 	The ESAPI_CONTEXT 	
in	path 	The path to the entity that is to be deleted	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or path is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if path cannot be deleted. 	
TSS2_FAPI_RC_NOT_DELETABLE 	if the entity is not deletable or the path is read-only. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
Fapi_Delete_Async (FAPI_CONTEXT *  context, char const *  path)
Asynchronous function for Fapi_Delete
Deletes a given key, policy or NV index from the system.
Call Fapi_Delete_Finish to finish the execution of this command.
Parameters:
in,out	context 	The ESAPI_CONTEXT 	
in	path 	The path to the entity that is to be deleted	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or path is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if path does not map to a FAPI entity. 	
TSS2_FAPI_RC_NOT_DELETABLE 	if the entity is not deletable or the path is read-only. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
Fapi_Delete_Finish (FAPI_CONTEXT *  context)
Asynchronous finish function for Fapi_Delete
This function should be called after a previous Fapi_Delete_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	

Fapi_ChangeAuth
Functions
TSS2_RC Fapi_ChangeAuth (FAPI_CONTEXT *context, char const *entityPath, char const *authValue)
TSS2_RC Fapi_ChangeAuth_Async (FAPI_CONTEXT *context, char const *entityPath, char const *authValue)
TSS2_RC Fapi_ChangeAuth_Finish (FAPI_CONTEXT *context)

Detailed Description
FAPI functions to invoke ChangeAuth either as one-call or in an asynchronous manner. 

Function Documentation
Fapi_ChangeAuth (FAPI_CONTEXT *  context, char const *  entityPath, char const *  authValue)
One-Call function for Fapi_ChangeAuth
Changes the Authorization data of an entity found at keyPath. The parameter authValue is a 0-terminated UTF-8 encoded password. If it is longer than the digest size of the entity's nameAlg, it will be hashed according the the TPM specification part 1, rev 138, section 19.6.4.3.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	entityPath 	The path to the entity to modify 	
in	authValue 	The new 0-terminated password to set for the entity. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or entityPath is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if entityPath does not map to a FAPI entity. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
Fapi_ChangeAuth_Async (FAPI_CONTEXT *  context, char const *  entityPath, char const *  authValue)
Asynchronous function for Fapi_ChangeAuth
Changes the Authorization data of an entity found at keyPath. The parameter authValue is a 0-terminated UTF-8 encoded password. If it is longer than the digest size of the entity's nameAlg, it will be hashed according the the TPM specification part 1, rev 138, section 19.6.4.3.
Call Fapi_ChangeAuth_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	entityPath 	The path to the entity to modify 	
in	authValue 	The new 0-terminated password to set for the entity. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or entityPath is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if entityPath does not map to a FAPI entity. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
Fapi_ChangeAuth_Finish (FAPI_CONTEXT *  context)
Asynchronous finish function for Fapi_ChangeAuth
This function should be called after a previous Fapi_ChangeAuth_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	

Fapi_SetDescription
Functions
TSS2_RC Fapi_SetDescription (FAPI_CONTEXT *context, char const *path, char const *description)
TSS2_RC Fapi_SetDescription_Async (FAPI_CONTEXT *context, char const *path, char const *description)
TSS2_RC Fapi_SetDescription_Finish (FAPI_CONTEXT *context)

Detailed Description
FAPI functions to invoke SetDescription either as one-call or in an asynchronous manner. 

Function Documentation
Fapi_SetDescription (FAPI_CONTEXT *  context, char const *  path, char const *  description)
One-Call function for Fapi_SetDescription
Associates a human readable description with an object in the metadata store.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	path 	The path of the object in the metadata store 	
in	description 	The description that is associated with the object. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or path is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if path does not map to a FAPI entity. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
Fapi_SetDescription_Async (FAPI_CONTEXT *  context, char const *  path, char const *  description)
Asynchronous function for Fapi_SetDescription
Associates a human readable description with an object in the metadata store.
Call Fapi_SetDescription_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	path 	The path of the object in the metadata store 	
in	description 	The description that is associated with the object. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or path is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if path does not map to a FAPI entity. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
Fapi_SetDescription_Finish (FAPI_CONTEXT *  context)
Asynchronous finish function for Fapi_SetDescription
This function should be called after a previous Fapi_SetDescription_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	If no file is found after pathname expansion. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	

Fapi_GetDescription
Functions
TSS2_RC Fapi_GetDescription (FAPI_CONTEXT *context, char const *path, char **description)
TSS2_RC Fapi_GetDescription_Async (FAPI_CONTEXT *context, char const *path)
TSS2_RC Fapi_GetDescription_Finish (FAPI_CONTEXT *context, char **description)

Detailed Description
FAPI functions to invoke GetDescription either as one-call or in an asynchronous manner. 

Function Documentation
Fapi_GetDescription (FAPI_CONTEXT *  context, char const *  path, char **  description)
One-Call function for Fapi_GetDescription
Returns the description of a previously stored object.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	path 	The path of the object for which the description is loaded 	
out	description 	The description of the object	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context, path or description is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if path does not map to a FAPI entity. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
Fapi_GetDescription_Async (FAPI_CONTEXT *  context, char const *  path)
Asynchronous function for Fapi_GetDescription
Returns the description of a previously stored object.
Call Fapi_GetDescription_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	path 	The path of the object for which the description is loaded	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or path is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if path does not map to a FAPI entity. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
Fapi_GetDescription_Finish (FAPI_CONTEXT *  context, char **  description)
Asynchronous finish function for Fapi_GetDescription
This function should be called after a previous Fapi_GetDescription_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
out	description 	The description of the object	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or description is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	

Fapi_SetAppData
Functions
TSS2_RC Fapi_SetAppData (FAPI_CONTEXT *context, char const *path, uint8_t const *appData, size_t appDataSize)
TSS2_RC Fapi_SetAppData_Async (FAPI_CONTEXT *context, char const *path, uint8_t const *appData, size_t appDataSize)
TSS2_RC Fapi_SetAppData_Finish (FAPI_CONTEXT *context)

Detailed Description
FAPI functions to invoke SetAppData either as one-call or in an asynchronous manner. 

Function Documentation
Fapi_SetAppData (FAPI_CONTEXT *  context, char const *  path, uint8_t const *  appData, size_t  appDataSize)
One-Call function for Fapi_SetAppData
Associates an arbitrary data blob with a given object.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	path 	The path to the object the blob is associated with 	
in	appData 	The blob to associate with the object. May be NULL 	
in	appDataSize 	The size of appData in bytes. Must be 0 if appData is NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or path is NULL or if appData is NULL and appDataSize is not 0. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if path does not map to a FAPI entity. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
Fapi_SetAppData_Async (FAPI_CONTEXT *  context, char const *  path, uint8_t const *  appData, size_t  appDataSize)
One-Call function for Fapi_SetAppData
Associates an arbitrary data blob with a given object.
Call Fapi_SetAppData_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	path 	The path to the object the blob is associated with 	
in	appData 	The blob to associate with the object. May be NULL 	
in	appDataSize 	The size of appData in bytes. Must be 0 if appData is NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or path is NULL or if appData is NULL and appDataSize is not 0. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if path does not map to a FAPI entity. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
Fapi_SetAppData_Finish (FAPI_CONTEXT *  context)
Asynchronous finish function for Fapi_SetAppData
This function should be called after a previous Fapi_SetAppData_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_BAD_PATH 	if a path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	

Fapi_GetAppData
Functions
TSS2_RC Fapi_GetAppData (FAPI_CONTEXT *context, char const *path, uint8_t **appData, size_t *appDataSize)
TSS2_RC Fapi_GetAppData_Async (FAPI_CONTEXT *context, char const *path)
TSS2_RC Fapi_GetAppData_Finish (FAPI_CONTEXT *context, uint8_t **appData, size_t *appDataSize)

Detailed Description
FAPI functions to invoke GetAppData either as one-call or in an asynchronous manner. 

Function Documentation
Fapi_GetAppData (FAPI_CONTEXT *  context, char const *  path, uint8_t **  appData, size_t *  appDataSize)
One-Call function for Fapi_GetAppData
Every object has a description field that can be retrieved in order to obtain additional information in its "path" entry.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	path 	The path to the object for which the appData is returned 	
out	appData 	A copy of the appData. May be NULL (callee-allocated) 	
out	appDataSize 	The size of the returned AppData. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or path is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if path does not map to a FAPI entity. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
Fapi_GetAppData_Async (FAPI_CONTEXT *  context, char const *  path)
Asynchronous function for Fapi_GetAppData
Every object has a description field that can be retrieved in order to obtain additional information in its "path" entry.
Call Fapi_GetAppData_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	path 	The path to the object for which the appData is returned	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or path is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if path does not map to a FAPI entity. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
Fapi_GetAppData_Finish (FAPI_CONTEXT *  context, uint8_t **  appData, size_t *  appDataSize)
Asynchronous finish function for Fapi_GetAppData
This function should be called after a previous Fapi_GetAppData_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
out	appData 	A copy of the appData. May be Null (callee-allocated) 	
out	appDataSize 	The size of the returned AppData. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_BAD_PATH 	if a path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	

Fapi_GetTpmBlobs
Functions
TSS2_RC Fapi_GetTpmBlobs (FAPI_CONTEXT *context, char const *path, uint8_t **tpm2bPublic, size_t *tpm2bPublicSize, uint8_t **tpm2bPrivate, size_t *tpm2bPrivateSize, char **policy)
TSS2_RC Fapi_GetTpmBlobs_Async (FAPI_CONTEXT *context, char const *path)
TSS2_RC Fapi_GetTpmBlobs_Finish (FAPI_CONTEXT *context, uint8_t **tpm2bPublic, size_t *tpm2bPublicSize, uint8_t **tpm2bPrivate, size_t *tpm2bPrivateSize, char **policy)

Detailed Description
FAPI functions to invoke GetTPMBlobs either as one-call or in an asynchronous manner. 

Function Documentation
Fapi_GetTpmBlobs (FAPI_CONTEXT *  context, char const *  path, uint8_t **  tpm2bPublic, size_t *  tpm2bPublicSize, uint8_t **  tpm2bPrivate, size_t *  tpm2bPrivateSize, char **  policy)
One-Call function for Fapi_GetTpmBlobs
Get the public and private blobs of a TPM object. They can be loaded with a lower-level API such as the SAPI or the ESAPI.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	path 	The path to the key for which the blobs will be returned 	
out	tpm2bPublic 	The returned public area of the object. May be NULL 	
out	tpm2bPublicSize 	The size of tpm2bPublic in bytes. May be NULL 	
out	tpm2bPrivate 	The returned private area of the object. May be NULL 	
out	tpm2bPrivateSize 	The size of tpm2bPrivate in bytes. May be NULL 	
out	policy 	The policy that is associated with the object encoded in JSON. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or path is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if path does not map to a FAPI entity. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
Fapi_GetTpmBlobs_Async (FAPI_CONTEXT *  context, char const *  path)
Asynchronous function for Fapi_GetTpmBlobs
Get the public and private blobs of a TPM object. They can be loaded with a lower-level API such as the SAPI or the ESAPI.
Call Fapi_GetTpmBlobs_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	path 	The path to the key for which the blobs will be returned	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or path is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if path does not map to a FAPI entity. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
Fapi_GetTpmBlobs_Finish (FAPI_CONTEXT *  context, uint8_t **  tpm2bPublic, size_t *  tpm2bPublicSize, uint8_t **  tpm2bPrivate, size_t *  tpm2bPrivateSize, char **  policy)
Asynchronous finish function for Fapi_GetTpmBlobs
This function should be called after a previous Fapi_GetTpmBlobs_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
out	tpm2bPublic 	The returned public area of the object. May be NULL 	
out	tpm2bPublicSize 	The size of tpm2bPublic in bytes. May be NULL 	
out	tpm2bPrivate 	The returned private area of the object. May be NULL 	
out	tpm2bPrivateSize 	The size of tpm2bPrivate in bytes. May be NULL 	
out	policy 	The policy that is associated with the object encoded in JSON. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_BAD_PATH 	if a path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	

Fapi_CreateKey
Functions
TSS2_RC Fapi_CreateKey (FAPI_CONTEXT *context, char const *path, char const *type, char const *policyPath, char const *authValue)
TSS2_RC Fapi_CreateKey_Async (FAPI_CONTEXT *context, char const *path, char const *type, char const *policyPath, char const *authValue)
TSS2_RC Fapi_CreateKey_Finish (FAPI_CONTEXT *context)

Detailed Description
FAPI functions to invoke CreateKey either as one-call or in an asynchronous manner. 

Function Documentation
Fapi_CreateKey (FAPI_CONTEXT *  context, char const *  path, char const *  type, char const *  policyPath, char const *  authValue)
One-Call function for Fapi_CreateKey
Creates a key inside the TPM based on the Key type, using the supplied policy and authValue. The key is then stored either in the FAPI metadata store or the TPM.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	path 	The path where the new key is stored 	
in	type 	The type of the new key. May be NULL 	
in	policyPath 	The path to the policy that is associated with the new key. May be NULL 	
in	authValue 	The authorization value for the new key. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or path is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if policyPath is non-NULL and does not map to a FAPI policy. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if the parent key does not map to a FAPI key. 	
TSS2_FAPI_RC_PATH_ALREADY_EXISTS 	if a file already exists at path. 	
TSS2_FAPI_RC_BAD_VALUE 	if the keyType is non-NULL and invalid. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occured. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
Fapi_CreateKey_Async (FAPI_CONTEXT *  context, char const *  path, char const *  type, char const *  policyPath, char const *  authValue)
Asynchronous function for Fapi_CreateKey
Creates a key inside the TPM based on the Key type, using the supplied policy and authValue. The key is then stored either in the FAPI metadata store or the TPM.
Call Fapi_CreateKey_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	path 	The path where the new key is stored 	
in	type 	The type of the new key. May be NULL 	
in	policyPath 	The path to the policy that is associated with the new key. May be NULL 	
in	authValue 	The authorization value for the new key. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or path is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if policyPath is non-NULL and does not map to a FAPI policy. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if the parent key does not map to a FAPI key. 	
TSS2_FAPI_RC_PATH_ALREADY_EXISTS 	if a file already exists at path. 	
TSS2_FAPI_RC_BAD_VALUE 	if the keyType is non-NULL and invalid. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
Fapi_CreateKey_Finish (FAPI_CONTEXT *  context)
Asynchronous finish function for Fapi_CreateKey
This function should be called after a previous Fapi_CreateKey_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occured. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_FAPI_RC_PATH_ALREADY_EXISTS 	if the object already exists in object store. 	

Fapi_Sign
Functions
TSS2_RC Fapi_Sign (FAPI_CONTEXT *context, char const *keyPath, char const *padding, uint8_t const *digest, size_t digestSize, uint8_t **signature, size_t *signatureSize, char **publicKey, char **certificate)
TSS2_RC Fapi_Sign_Async (FAPI_CONTEXT *context, char const *keyPath, char const *padding, uint8_t const *digest, size_t digestSize)
TSS2_RC Fapi_Sign_Finish (FAPI_CONTEXT *context, uint8_t **signature, size_t *signatureSize, char **publicKey, char **certificate)

Detailed Description
FAPI functions to invoke Sign either as one-call or in an asynchronous manner. 

Function Documentation
Fapi_Sign (FAPI_CONTEXT *  context, char const *  keyPath, char const *  padding, uint8_t const *  digest, size_t  digestSize, uint8_t **  signature, size_t *  signatureSize, char **  publicKey, char **  certificate)
One-Call function for Fapi_Sign
Uses a key, identified by its path, to sign a digest and puts the result in a TPM2B bytestream.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	keyPath 	The path of the signature key 	
in	padding 	A padding algorithm. Must be either "RSA_SSA" or "RSA_PSS" or NULL 	
in	digest 	The digest to sign. Must be already hashed 	
in	digestSize 	The size of the digest in bytes 	
out	signature 	The signature 	
out	signatureSize 	The size of signature in bytes. May be NULL 	
out	publicKey 	The public key that can be used to verify signature in PEM format. May be NULL 	
out	certificate 	The certificate associated with the signing key in PEM format. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context, keyPath, digest or signature is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if keyPath does not map to a FAPI key. 	
TSS2_FAPI_RC_BAD_KEY 	if the object at keyPath is not a key, or is a key that is unsuitable for the requested operation. 	
TSS2_FAPI_RC_BAD_VALUE 	if the digestSize is zero. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
Fapi_Sign_Async (FAPI_CONTEXT *  context, char const *  keyPath, char const *  padding, uint8_t const *  digest, size_t  digestSize)
Asynchronous function for Fapi_Sign
Uses a key, identified by its path, to sign a digest and puts the result in a TPM2B bytestream.
Call Fapi_Sign_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	keyPath 	The path of the signature key 	
in	padding 	A padding algorithm. Must be either "RSA_SSA" or "RSA_PSS" or NULL 	
in	digest 	The digest to sign. Must be already hashed 	
in	digestSize 	The size of the digest in bytes	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context, keyPath or digest is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if keyPath does not map to a FAPI key. 	
TSS2_FAPI_RC_BAD_KEY 	if the object at keyPath is not a key, or is a key that is unsuitable for the requested operation. 	
TSS2_FAPI_RC_BAD_VALUE 	if the digestSize is zero. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
Fapi_Sign_Finish (FAPI_CONTEXT *  context, uint8_t **  signature, size_t *  signatureSize, char **  publicKey, char **  certificate)
Asynchronous finish function for Fapi_Sign
This function should be called after a previous Fapi_Sign_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
out	signature 	The signature 	
out	signatureSize 	The size of signature in bytes. May be NULL 	
out	publicKey 	The public key that can be used to verify signature in PEM format. May be NULL 	
out	certificate 	The certificate associated with the signing key in PEM format. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or signature is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	

Fapi_VerifySignature
Functions
TSS2_RC Fapi_VerifySignature (FAPI_CONTEXT *context, char const *keyPath, uint8_t const *digest, size_t digestSize, uint8_t const *signature, size_t signatureSize)
TSS2_RC Fapi_VerifySignature_Async (FAPI_CONTEXT *context, char const *keyPath, uint8_t const *digest, size_t digestSize, uint8_t const *signature, size_t signatureSize)
TSS2_RC Fapi_VerifySignature_Finish (FAPI_CONTEXT *context)

Detailed Description
FAPI functions to invoke VerifySignature either as one-call or in an asynchronous manner. 

Function Documentation
Fapi_VerifySignature (FAPI_CONTEXT *  context, char const *  keyPath, uint8_t const *  digest, size_t  digestSize, uint8_t const *  signature, size_t  signatureSize)
One-Call function for Fapi_VerifySignature
Verifies a signature using a public key found in a keyPath.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	keyPath 	The path to the verification public key 	
in	digest 	The that was signed. Must be already hashed 	
in	digestSize 	the size of digest in bytes 	
in	signature 	The signature to be verified 	
in	signatureSize 	The size of signature in bytes	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context, keyPath, signature, or digest is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if keyPath does not map to a FAPI object. 	
TSS2_FAPI_RC_BAD_KEY 	if the object at publicKeyPath is not a key, or is a key that is unsuitable for the requested operation. 	
TSS2_FAPI_RC_BAD_VALUE 	if signature is invalid (has the wrong format) or if digestSize is zero. 	
TSS2_FAPI_RC_SIGNATURE_VERIFICATION_FAILED 	if the signature fails to verify. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
Fapi_VerifySignature_Async (FAPI_CONTEXT *  context, char const *  keyPath, uint8_t const *  digest, size_t  digestSize, uint8_t const *  signature, size_t  signatureSize)
Asynchronous function for Fapi_VerifySignature
Verifies a signature using a public key found in a keyPath.
Call Fapi_VerifySignature_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	keyPath 	The path to the verification public key 	
in	digest 	The that was signed. Must be already hashed 	
in	digestSize 	the size of digest in bytes 	
in	signature 	The signature to be verified 	
in	signatureSize 	The size of signature in bytes	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context, keyPath, signature, or digest is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if keyPath does not map to a FAPI object. 	
TSS2_FAPI_RC_BAD_KEY 	if the object at publicKeyPath is not a key, or is a key that is unsuitable for the requested operation. 	
TSS2_FAPI_RC_BAD_VALUE 	if signature is invalid (has the wrong format) or if digestSize is zero. 	
TSS2_FAPI_RC_SIGNATURE_VERIFICATION_FAILED 	if the signature fails to verify. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
Fapi_VerifySignature_Finish (FAPI_CONTEXT *  context)
Asynchronous finish function for Fapi_VerifySignature
This function should be called after a previous Fapi_VerifySignature_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_SIGNATURE_VERIFICATION_FAILED 	if the signature could not be verified 	

Fapi_Encrypt
Functions
TSS2_RC Fapi_Encrypt (FAPI_CONTEXT *context, char const *keyPath, uint8_t const *plainText, size_t plainTextSize, uint8_t **cipherText, size_t *cipherTextSize)
TSS2_RC Fapi_Encrypt_Async (FAPI_CONTEXT *context, char const *keyPath, uint8_t const *plainText, size_t plainTextSize)
TSS2_RC Fapi_Encrypt_Finish (FAPI_CONTEXT *context, uint8_t **cipherText, size_t *cipherTextSize)

Detailed Description
FAPI functions to invoke Encrypt either as one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Fapi_Encrypt (FAPI_CONTEXT *  context, char const *  keyPath, uint8_t const *  plainText, size_t  plainTextSize, uint8_t **  cipherText, size_t *  cipherTextSize)
One-Call function for Fapi_Encrypt
Encrypt the provided data for the target key using the TPM encryption schemes as specified in the crypto profile. This function does not use the TPM; i.e. works in non-TPM mode.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	keyPath 	THe path to the encryption key 	
in	plainText 	The plaintext data to encrypt 	
in	plainTextSize 	The size of the plainText in bytes 	
out	cipherText 	The encoded cipher text. 	
out	cipherTextSize 	The size of the encoded cipher text.	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context, keyPath, plainText, or cipherText is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if keyPath does not map to a FAPI key. 	
TSS2_FAPI_RC_BAD_KEY 	if the key at keyPath is unsuitable for encryption. 	
TSS2_FAPI_RC_BAD_VALUE 	if plainTextSize is 0. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_IO_ERROR 	if an error occurred while accessing the object store. 	
TSS2_FAPI_RC_NOT_IMPLEMENTED 	if the encryption algorithm is not available. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_RC Fapi_Encrypt_Async (FAPI_CONTEXT *  context, char const *  keyPath, uint8_t const *  plainText, size_t  plainTextSize)
Asynchronous function for Fapi_Encrypt
Encrypt the provided data for the target key using the TPM encryption schemes as specified in the crypto profile. This function does not use the TPM; i.e. works in non-TPM mode.
Call Fapi_Encrypt_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	keyPath 	The path to the encryption key 	
in	plainText 	The plainText data to encrypt 	
in	plainTextSize 	The size of the plainText in bytes	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context, keyPath or plainText is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if keyPath does not map to a FAPI key. 	
TSS2_FAPI_RC_BAD_KEY 	if the key at keyPath is unsuitable for encryption. 	
TSS2_FAPI_RC_BAD_VALUE 	if plainTextSize is 0. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_RC Fapi_Encrypt_Finish (FAPI_CONTEXT *  context, uint8_t **  cipherText, size_t *  cipherTextSize)
Asynchronous finish function for Fapi_Encrypt
This function should be called after a previous Fapi_Encrypt_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
out	cipherText 	The encoded ciphertext 	
out	cipherTextSize 	The size of the encoded cipher text.	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or ciphertext is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_NOT_IMPLEMENTED 	if the encryption algorithm is not available. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	

Fapi_Decrypt
Functions
TSS2_RC Fapi_Decrypt (FAPI_CONTEXT *context, char const *keyPath, uint8_t const *cipherText, size_t cipherTextSize, uint8_t **plainText, size_t *plainTextSize)
TSS2_RC Fapi_Decrypt_Async (FAPI_CONTEXT *context, char const *keyPath, uint8_t const *cipherText, size_t cipherTextSize)
TSS2_RC Fapi_Decrypt_Finish (FAPI_CONTEXT *context, uint8_t **plainText, size_t *plainTextSize)

Detailed Description
FAPI functions to invoke Decrypt either as one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Fapi_Decrypt (FAPI_CONTEXT *  context, char const *  keyPath, uint8_t const *  cipherText, size_t  cipherTextSize, uint8_t **  plainText, size_t *  plainTextSize)
One-Call function for Fapi_Decrypt
Decrypts data that was previously encrypted with Fapi_Encrypt.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	keyPath 	The decryption key. 	
in	cipherText 	The ciphertext to decrypt. 	
in	cipherTextSize 	The size of the ciphertext to decrypt. 	
out	plainText 	the decrypted ciphertext. May be NULL (callee-allocated) 	
out	plainTextSize 	The size of the ciphertext in bytes. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or cipherText is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if can't find the key necessary to decrypt the file. 	
TSS2_FAPI_RC_BAD_KEY 	if the decryption key is unsuitable for the requested operation. 	
TSS2_FAPI_RC_BAD_VALUE 	if the decryption fails 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_RC Fapi_Decrypt_Async (FAPI_CONTEXT *  context, char const *  keyPath, uint8_t const *  cipherText, size_t  cipherTextSize)
Asynchronous function for Fapi_Decrypt
Decrypts data that was previously encrypted with Fapi_Encrypt.
Call Fapi_Decrypt_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	keyPath 	The decryption key. 	
in	cipherText 	The ciphertext to decrypt 	
in	cipherTextSize 	The size of the ciphertext to decrypt	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or cipherText is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if can't find the key necessary to decrypt the file. 	
TSS2_FAPI_RC_BAD_KEY 	if the decryption key is unsuitable for the requested operation. 	
TSS2_FAPI_RC_BAD_VALUE 	if the decryption fails 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_RC Fapi_Decrypt_Finish (FAPI_CONTEXT *  context, uint8_t **  plainText, size_t *  plainTextSize)
Asynchronous finish function for Fapi_Decrypt
This function should be called after a previous Fapi_Decrypt.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
out	plainText 	the decrypted ciphertext. May be NULL (callee-allocated) 	
out	plainTextSize 	The size of the ciphertext in bytes. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context, plainText or plainTextSize is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	

Fapi_SetCertificate
Functions
TSS2_RC Fapi_SetCertificate (FAPI_CONTEXT *context, char const *path, char const *x509certData)
TSS2_RC Fapi_SetCertificate_Async (FAPI_CONTEXT *context, char const *path, char const *x509certData)
TSS2_RC Fapi_SetCertificate_Finish (FAPI_CONTEXT *context)

Detailed Description
FAPI functions to invoke SetCertificate either as one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Fapi_SetCertificate (FAPI_CONTEXT *  context, char const *  path, char const *  x509certData)
One-Call function for Fapi_SetCertificate
Sets an x509 cert into the path of a key.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	path 	The path of the entity to be associated with the certificate 	
in	x509certData 	The certificate that is associated with the entity. If this is NULL an existing certificate will be removed from the entity	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or path is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if path does not map to a FAPI entity. 	
TSS2_FAPI_RC_BAD_KEY 	if x509certData is invalid. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_RC Fapi_SetCertificate_Async (FAPI_CONTEXT *  context, char const *  path, char const *  x509certData)
Asynchronous function for Fapi_SetCertificate
Sets an x509 cert into the path of a key.
Call Fapi_SetCertificate_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	path 	The path of the entity to be associated with the certificate 	
in	x509certData 	The certificate that is associated with the entity. If this is NULL an existing certificate will be removed from the entity	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or path is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if path does not map to a FAPI entity. 	
TSS2_FAPI_RC_BAD_KEY 	if x509certData is invalid. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_RC Fapi_SetCertificate_Finish (FAPI_CONTEXT *  context)
Asynchronous finish function for Fapi_SetCertificate
This function should be called after a previous Fapi_SetCertificate_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	

Fapi_GetCertificate
Functions
TSS2_RC Fapi_GetCertificate (FAPI_CONTEXT *context, char const *path, char **x509certData)
TSS2_RC Fapi_GetCertificate_Async (FAPI_CONTEXT *context, char const *path)
TSS2_RC Fapi_GetCertificate_Finish (FAPI_CONTEXT *context, char **x509certData)

Detailed Description
FAPI functions to invoke GetCertificate either as one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Fapi_GetCertificate (FAPI_CONTEXT *  context, char const *  path, char **  x509certData)
One-Call function for Fapi_GetCertificate
Gets an x.509 certificate for the key at a given path.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	path 	The path to the key whose certificate is created 	
out	x509certData 	The PEM-encoded certificate	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context, path or x509CertData is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if path does not map to a FAPI entity. 	
TSS2_FAPI_RC_BAD_KEY 	if the key is unsuitable for the requested operation. 	
TSS2_FAPI_RC_NO_CERTIFICATE 	if there is not a x.509 cert associated with the path of the key. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_RC Fapi_GetCertificate_Async (FAPI_CONTEXT *  context, char const *  path)
Asynchronous function for Fapi_GetCertificate
Gets an x.509 certificate for the key at a given path.
Call Fapi_GetCertificate_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	path 	The path to the key whose certificate is created	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or path is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if path does not map to a FAPI entity. 	
TSS2_FAPI_RC_BAD_KEY 	if the key is unsuitable for the requested operation. 	
TSS2_FAPI_RC_NO_CERTIFICATE 	if there is not a x.509 cert associated with the path of the key. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_RC Fapi_GetCertificate_Finish (FAPI_CONTEXT *  context, char **  x509certData)
Asynchronous finish function for Fapi_GetCertificate
This function should be called after a previous Fapi_GetCertificate_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
out	x509certData 	The PEM-encoded certificate	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or x509certData is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	

Fapi_ExportKey
Functions
TSS2_RC Fapi_ExportKey (FAPI_CONTEXT *context, char const *pathOfKeyToDuplicate, char const *pathToPublicKeyOfNewParent, char **exportedData)
TSS2_RC Fapi_ExportKey_Async (FAPI_CONTEXT *context, char const *pathOfKeyToDuplicate, char const *pathToPublicKeyOfNewParent)
TSS2_RC Fapi_ExportKey_Finish (FAPI_CONTEXT *context, char **exportedData)

Detailed Description
FAPI functions to invoke ExportKey either as one-call or in an asynchronous manner. 

Function Documentation
Fapi_ExportKey (FAPI_CONTEXT *  context, char const *  pathOfKeyToDuplicate, char const *  pathToPublicKeyOfNewParent, char **  exportedData)
One-Call function for Fapi_ExportKey
Given a key it will (if the key is a storage key) duplicate the key and package up the duplicated key and all keys below it into a file ready to move to a new TPM.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	pathOfKeyToDuplicate 	The path to the root of the subtree to export. 	
in	pathToPublicKeyOfNewParent 	The path to the public key of the new parent. May be NULL 	
out	exportedData 	The exported subtree	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context, pathOfKeyToDuplicate or exportedData is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if pathOfKeyToDuplicate or pathToPublicKeyOfNewParent does not map to a . FAPI object. 	
TSS2_FAPI_RC_BAD_KEY 	if the key at pathToPublicKeyOfNewParent is not suitable for the requeste operation. 	
TSS2_FAPI_RC_KEY_NOT_DUPLICABLE 	if the key is not a duplicable key. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_BAD_PATH 	if a path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
Fapi_ExportKey_Async (FAPI_CONTEXT *  context, char const *  pathOfKeyToDuplicate, char const *  pathToPublicKeyOfNewParent)
Asynchronous function for Fapi_ExportKey
Given a key it will (if the key is a storage key) duplicate the key and package up the duplicated key and all keys below it into a file ready to move to a new TPM.
Call Fapi_ExportKey_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	pathOfKeyToDuplicate 	The path to the root of the subtree to export. 	
in	pathToPublicKeyOfNewParent 	The path to the public key of the new parent	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or pathOfKeyToDuplicate is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if pathOfKeyToDuplicate or pathToPublicKeyOfNewParent does not map to a . FAPI object. 	
TSS2_FAPI_RC_BAD_KEY 	if the key at pathToPublicKeyOfNewParent is not suitable for the requeste operation. 	
TSS2_FAPI_RC_KEY_NOT_DUPLICABLE 	if the key is not a duplicable key. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
Fapi_ExportKey_Finish (FAPI_CONTEXT *  context, char **  exportedData)
Asynchronous finish function for Fapi_ExportKey
This function should be called after a previous Fapi_ExportKey_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
out	exportedData 	The exported subtree	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or exportedData is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_BAD_PATH 	if a path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	

Fapi_CreateSeal
Functions
TSS2_RC Fapi_CreateSeal (FAPI_CONTEXT *context, char const *path, char const *type, size_t size, char const *policyPath, char const *authValue, uint8_t const *data)
TSS2_RC Fapi_CreateSeal_Async (FAPI_CONTEXT *context, char const *path, char const *type, size_t size, char const *policyPath, char const *authValue, uint8_t const *data)
TSS2_RC Fapi_CreateSeal_Finish (FAPI_CONTEXT *context)

Detailed Description
FAPI functions to invoke CreateSeal either as one-call or in an asynchronous manner. 

Function Documentation
Fapi_CreateSeal (FAPI_CONTEXT *  context, char const *  path, char const *  type, size_t  size, char const *  policyPath, char const *  authValue, uint8_t const *  data)
One-Call function for Fapi_CreateSeal
Creates a sealed object and stores it in the FAPI metadata store. If no data is provided, the TPM generates random data to fill the sealed object.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	path 	The path to the new sealed object 	
in	type 	The type of the new sealed object. May be NULL 	
in	size 	The size of the new sealed object. Must not be 0 	
in	policyPath 	The path to the policy that is associated with the new sealed object. May be NULL 	
in	authValue 	The authorization value for the new sealed object. May be NULL 	
in	data 	The data that is to be sealed within the new object. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context, or path is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if the parent key does not map to a FAPI key. 	
TSS2_FAPI_RC_BAD_PATH 	if policyPath is non-NULL and does not map to a FAPI key. 	
TSS2_FAPI_RC_PATH_ALREADY_EXISTS 	if a sealed object already exists at path. 	
TSS2_FAPI_RC_BAD_VALUE 	if the keyType is invalid. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occured. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
Fapi_CreateSeal_Async (FAPI_CONTEXT *  context, char const *  path, char const *  type, size_t  size, char const *  policyPath, char const *  authValue, uint8_t const *  data)
Asynchronous function for Fapi_CreateSeal
Creates a sealed object and stores it in the FAPI metadata store. If no data is provided, the TPM generates random data to fill the sealed object.
Call Fapi_CreateSeal_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	path 	The path to the new sealed object 	
in	type 	The type of the new sealed object. May be NULL 	
in	size 	The size of the new sealed object. Must not be 0 	
in	policyPath 	The path to the policy that is associated with the new sealed object. May be NULL 	
in	authValue 	The authorization value for the new sealed object. May be NULL 	
in	data 	The data that is to be sealed within the new object. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context, or path is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if the parent key does not map to a FAPI key. 	
TSS2_FAPI_RC_BAD_PATH 	if policyPath is non-NULL and does not map to a FAPI key. 	
TSS2_FAPI_RC_PATH_ALREADY_EXISTS 	if a sealed object already exists at path. 	
TSS2_FAPI_RC_BAD_VALUE 	if the keyType is invalid. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
Fapi_CreateSeal_Finish (FAPI_CONTEXT *  context)
Asynchronous finish function for Fapi_CreateSeal
This function should be called after a previous Fapi_CreateSeal.
Parameters:
in,out	context 	The FAPI_CONTEXT	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occured. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_FAPI_RC_PATH_ALREADY_EXISTS 	if the object already exists in object store. 	

Fapi_Unseal
Functions
TSS2_RC Fapi_Unseal (FAPI_CONTEXT *context, char const *path, uint8_t **data, size_t *size)
TSS2_RC Fapi_Unseal_Async (FAPI_CONTEXT *context, char const *path)
TSS2_RC Fapi_Unseal_Finish (FAPI_CONTEXT *context, uint8_t **data, size_t *size)

Detailed Description
FAPI functions to invoke Unseal either as one-call or in an asynchronous manner. 

Function Documentation
Fapi_Unseal (FAPI_CONTEXT *  context, char const *  path, uint8_t **  data, size_t *  size)
One-Call function for Fapi_Unseal
Unseals data from a seal in the FAPI metadata store.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	path 	The path to the sealed data 	
out	data 	The decrypted data after unsealing. May be NULL 	
out	size 	The size of data in bytes. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or path is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if path does not point to a sealed data object. 	
TSS2_FAPI_RC_BAD_VALUE 	if the digestSize is zero. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_SIGNATURE_VERIFICATION_FAILED 	if the signature could not be verified 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
Fapi_Unseal_Async (FAPI_CONTEXT *  context, char const *  path)
Asynchronous function for Fapi_Unseal
Unseals data from a seal in the FAPI metadata store.
Call Fapi_Unseal_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	path 	The path to the sealed data	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or path is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if path does not point to a sealed data object. 	
TSS2_FAPI_RC_BAD_VALUE 	if the digestSize is zero. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
Fapi_Unseal_Finish (FAPI_CONTEXT *  context, uint8_t **  data, size_t *  size)
Asynchronous finish function for Fapi_Unseal
This function should be called after a previous Fapi_Unseal_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
out	data 	The decrypted data after unsealing. May be NULL 	
out	size 	The size of data in bytes. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_SIGNATURE_VERIFICATION_FAILED 	if the signature could not be verified 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	

Fapi_ExportPolicy
Functions
TSS2_RC Fapi_ExportPolicy (FAPI_CONTEXT *context, char const *path, char **jsonPolicy)
TSS2_RC Fapi_ExportPolicy_Async (FAPI_CONTEXT *context, char const *path)
TSS2_RC Fapi_ExportPolicy_Finish (FAPI_CONTEXT *context, char **jsonPolicy)

Detailed Description
FAPI functions to invoke ExportPolicy either as one-call or in an asynchronous manner. 

Function Documentation
Fapi_ExportPolicy (FAPI_CONTEXT *  context, char const *  path, char **  jsonPolicy)
One-Call function for Fapi_ExportPolicy
Exports a policy to a JSON encoded byte buffer.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	path 	The path to the policy that is to be exported 	
out	jsonPolicy 	The JSON-encoded policy. jsonPolicy MUST NOT be NULL.	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context, path or jsonPolicy is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if path does not map to a FAPI policy. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
Fapi_ExportPolicy_Async (FAPI_CONTEXT *  context, char const *  path)
Asynchronous function for Fapi_ExportPolicy
Exports a policy to a JSON encoded byte buffer.
Call Fapi_ExportPolicy_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	path 	The path to the policy that is to be exported	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or path is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if path does not map to a FAPI policy. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
Fapi_ExportPolicy_Finish (FAPI_CONTEXT *  context, char **  jsonPolicy)
Asynchronous finish function for Fapi_ExportPolicy
This function should be called after a previous Fapi_ExportPolicy_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
out	jsonPolicy 	The JSON-encoded policy. jsonPolicy MUST NOT be NULL.	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or jsonPolicy is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_BAD_PATH 	if a path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	

Fapi_AuthorizePolicy
Functions
TSS2_RC Fapi_AuthorizePolicy (FAPI_CONTEXT *context, char const *policyPath, char const *keyPath, uint8_t const *policyRef, size_t policyRefSize)
TSS2_RC Fapi_AuthorizePolicy_Async (FAPI_CONTEXT *context, char const *policyPath, char const *keyPath, uint8_t const *policyRef, size_t policyRefSize)
TSS2_RC Fapi_AuthorizePolicy_Finish (FAPI_CONTEXT *context)

Detailed Description
FAPI functions to invoke AuthorizePolicy either as one-call or in an asynchronous manner. 

Function Documentation
Fapi_AuthorizePolicy (FAPI_CONTEXT *  context, char const *  policyPath, char const *  keyPath, uint8_t const *  policyRef, size_t  policyRefSize)
One-Call function for Fapi_AuthorizePolicy
If a current policy happens to be a PolicyAuthorize, then for it to be used, the user must first satisfy a policy authorized by a having been signed (and made into a ticket) by an authorized party.
Parameters:
in,out	context 	The FAPI context 	
in	policyPath 	The path to the policy file 	
in	keyPath 	The path to the signing key 	
in	policyRef 	A byte buffer that is included in the signature. May be NULL 	
in	policyRefSize 	The size of policyRef. Must be 0 if policyRef is NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context, policyPath or keyPath is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if policyPath or keyPath does not map to a FAPI policy or key object. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
Fapi_AuthorizePolicy_Async (FAPI_CONTEXT *  context, char const *  policyPath, char const *  keyPath, uint8_t const *  policyRef, size_t  policyRefSize)
Asynchronous function for Fapi_AuthorizePolicy
If a current policy happens to be a PolicyAuthorize, then for it to be used, the user must first satisfy a policy authorized by a having been signed (and made into a ticket) by an authorized party.
Call Fapi_AuthorizePolicy_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI context 	
in	policyPath 	The path to the policy file 	
in	keyPath 	The path to the signing key 	
in	policyRef 	A byte buffer that is included in the signature. May be NULL 	
in	policyRefSize 	The size of policyRef. Must be 0 if policyRef is NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context, policyPath or keyPath is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if policyPath or keyPath does not map to a FAPI policy or key object. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
Fapi_AuthorizePolicy_Finish (FAPI_CONTEXT *  context)
Asynchronous finish function for Fapi_AuthorizePolicy
This function should be called after a previous Fapi_AuthorizePolicy_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	

Fapi_WriteAuthorizeNv
Functions
TSS2_RC Fapi_WriteAuthorizeNv (FAPI_CONTEXT *context, char const *nvPath, char const *policyPath)
TSS2_RC Fapi_WriteAuthorizeNv_Async (FAPI_CONTEXT *context, char const *nvPath, char const *policyPath)
TSS2_RC Fapi_WriteAuthorizeNv_Finish (FAPI_CONTEXT *context)

Detailed Description
FAPI functions to invoke WriteAuthorizeNv either as one-call or in an asynchronous manner. 

Function Documentation
Fapi_WriteAuthorizeNv (FAPI_CONTEXT *  context, char const *  nvPath, char const *  policyPath)
One-Call function for Fapi_WriteAuthorizeNv
Write the policyDigest of a policy to an NV index so it can be used in policies containing PolicyAuthorizeNV elements.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	nvPath 	The path of the NV index 	
in	policyPath 	The path of the new policy	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or path is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if nvPath or policyPath does not map to a FAPI policy or NV index. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
Fapi_WriteAuthorizeNv_Async (FAPI_CONTEXT *  context, char const *  nvPath, char const *  policyPath)
Asynchronous function for Fapi_WriteAuthorizeNv
Write the policyDigest of a policy to an NV index so it can be used in policies containing PolicyAuthorizeNV elements.
Call Fapi_WriteAuthorizeNv_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	nvPath 	The path of the NV index 	
in	policyPath 	The path of the new policy	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or path is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if nvPath or policyPath does not map to a FAPI policy or NV index. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
Fapi_WriteAuthorizeNv_Finish (FAPI_CONTEXT *  context)
Asynchronous finish function for Fapi_WriteAuthorizeNv
This function should be called after a previous Fapi_WriteAuthorizeNv_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	

Fapi_PcrRead
Functions
TSS2_RC Fapi_PcrRead (FAPI_CONTEXT *context, uint32_t pcrIndex, uint8_t **pcrValue, size_t *pcrValueSize, char **pcrLog)
TSS2_RC Fapi_PcrRead_Async (FAPI_CONTEXT *context, uint32_t pcrIndex)
TSS2_RC Fapi_PcrRead_Finish (FAPI_CONTEXT *context, uint8_t **pcrValue, size_t *pcrValueSize, char **pcrLog)

Detailed Description
FAPI functions to invoke PcrRead either as one-call or in an asynchronous manner. 

Function Documentation
Fapi_PcrRead (FAPI_CONTEXT *  context, uint32_t  pcrIndex, uint8_t **  pcrValue, size_t *  pcrValueSize, char **  pcrLog)
One-Call function for Fapi_PcrRead
Reads from a given PCR and returns the value and the event log.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	pcrIndex 	The index of the PCR to read 	
out	pcrValue 	The value of the PCR. May be NULL 	
out	pcrValueSize 	The size of value in bytes. May be NULL 	
out	pcrLog 	The PCR log. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context, pcrValue or pcrValueSize is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_VALUE 	if pcrIndex is invalid. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_FAPI_RC_NO_CERT 	if an error did occur during certificate downloading. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
Fapi_PcrRead_Async (FAPI_CONTEXT *  context, uint32_t  pcrIndex)
Asynchronous function for Fapi_PcrRead
Reads from a given PCR and returns the value and the event log.
Call Fapi_PcrRead_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	pcrIndex 	The index of the PCR to read	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_VALUE 	if pcrIndex is invalid. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
Fapi_PcrRead_Finish (FAPI_CONTEXT *  context, uint8_t **  pcrValue, size_t *  pcrValueSize, char **  pcrLog)
Asynchronous finish function for Fapi_PcrRead
This function should be called after a previous Fapi_PcrRead_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
out	pcrValue 	The value of the PCR. May be NULL 	
out	pcrValueSize 	The size of value in bytes. May be NULL 	
out	pcrLog 	The PCR log. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context, pcrValue or pcrValueSize is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	

Fapi_PcrExtend
Functions
TSS2_RC Fapi_PcrExtend (FAPI_CONTEXT *context, uint32_t pcr, uint8_t const *data, size_t dataSize, char const *logData)
TSS2_RC Fapi_PcrExtend_Async (FAPI_CONTEXT *context, uint32_t pcr, uint8_t const *data, size_t dataSize, char const *logData)
TSS2_RC Fapi_PcrExtend_Finish (FAPI_CONTEXT *context)

Detailed Description
FAPI functions to invoke PcrExtend either as one-call or in an asynchronous manner. 

Function Documentation
Fapi_PcrExtend (FAPI_CONTEXT *  context, uint32_t  pcr, uint8_t const *  data, size_t  dataSize, char const *  logData)
One-Call function for Fapi_PcrExtend
Performs an extend operation on a given PCR.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	pcr 	The PCR to extend 	
in	data 	The data that is to be extended on the PCR 	
in	dataSize 	The size of data in bytes 	
in	logData 	A JSON representation of data to be written to the PCR's event log. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or data is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_NO_PCR 	if no such PCR exists on this TPM. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
Fapi_PcrExtend_Async (FAPI_CONTEXT *  context, uint32_t  pcr, uint8_t const *  data, size_t  dataSize, char const *  logData)
Asynchronous function for Fapi_PcrExtend
Performs an extend operation on a given PCR.
Call Fapi_PcrExtend_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	pcr 	The PCR to extend 	
in	data 	The data that is to be extended on the PCR 	
in	dataSize 	The size of data in bytes 	
in	logData 	A JSON representation of data to be written to the PCR's event log. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or data is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_NO_PCR 	if no such PCR exists on this TPM. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
Fapi_PcrExtend_Finish (FAPI_CONTEXT *  context)
Asynchronous finish function for Fapi_PcrExtend
This function should be called after a previous Fapi_PcrExtend_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	

Fapi_Quote
Functions
TSS2_RC Fapi_Quote (FAPI_CONTEXT *context, uint32_t *pcrList, size_t pcrListSize, char const *keyPath, char const *quoteType, uint8_t const *qualifyingData, size_t qualifyingDataSize, char **quoteInfo, uint8_t **signature, size_t *signatureSize, char **pcrLog, char **certificate)
TSS2_RC Fapi_Quote_Async (FAPI_CONTEXT *context, uint32_t *pcrList, size_t pcrListSize, char const *keyPath, char const *quoteType, uint8_t const *qualifyingData, size_t qualifyingDataSize)
TSS2_RC Fapi_Quote_Finish (FAPI_CONTEXT *context, char **quoteInfo, uint8_t **signature, size_t *signatureSize, char **pcrLog, char **certificate)

Detailed Description
FAPI functions to invoke Quote either as one-call or in an asynchronous manner. 

Function Documentation
Fapi_Quote (FAPI_CONTEXT *  context, uint32_t *  pcrList, size_t  pcrListSize, char const *  keyPath, char const *  quoteType, uint8_t const *  qualifyingData, size_t  qualifyingDataSize, char **  quoteInfo, uint8_t **  signature, size_t *  signatureSize, char **  pcrLog, char **  certificate)
One-Call function for Fapi_Quote
Given a set of PCRs and a restricted signing key, it will sign those PCRs and return the quote.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	pcrList 	The list of PCRs that are to be quoted 	
in	pcrListSize 	The size of pcrList in bytes 	
in	keyPath 	The path to the signing key 	
in	quoteType 	The type of quote. May be NULL 	
in	qualifyingData 	A nonce provided by the caller. May be NULL 	
in	qualifyingDataSize 	The size of qualifyingData in bytes. Must be 0 if qualifyingData is NULL 	
out	quoteInfo 	A JSON-encoded structure holding the inputs to the quote operation 	
out	signature 	The signature of the PCRs 	
out	signatureSize 	The size of the signature in bytes. May be NULL 	
out	pcrLog 	The log of the PCR. May be NULL 	
out	certificate 	The certificate associated with the signing key. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context, pcrList, keyPath, quoteInfo or signature is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if path does not map to a FAPI entity. 	
TSS2_FAPI_RC_BAD_KEY 	if the entity at path is not a key, or is a key that is unsuitable for the requested operation. 	
TSS2_FAPI_RC_BAD_VALUE 	if qualifyingData is invalid or if qualifyingDataSize is zero. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
Fapi_Quote_Async (FAPI_CONTEXT *  context, uint32_t *  pcrList, size_t  pcrListSize, char const *  keyPath, char const *  quoteType, uint8_t const *  qualifyingData, size_t  qualifyingDataSize)
Asynchronous function for Fapi_Quote
Given a set of PCRs and a restricted signing key, it will sign those PCRs and return the quote.
Call Fapi_Quote_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	pcrList 	The list of PCRs that are to be quoted 	
in	pcrListSize 	The size of pcrList in bytes 	
in	keyPath 	The path to the signing key 	
in	quoteType 	The type of quote. May be NULL 	
in	qualifyingData 	A nonce provided by the caller. May be NULL 	
in	qualifyingDataSize 	The size of qualifyingData in bytes. Must be 0 if qualifyingData is NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context, pcrList or keyPath is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if path does not map to a FAPI entity. 	
TSS2_FAPI_RC_BAD_KEY 	if the entity at path is not a key, or is a key that is unsuitable for the requested operation. 	
TSS2_FAPI_RC_BAD_VALUE 	if pcrListSize is 0, qualifyingData is invalid or if qualifyingDataSize is zero. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
Fapi_Quote_Finish (FAPI_CONTEXT *  context, char **  quoteInfo, uint8_t **  signature, size_t *  signatureSize, char **  pcrLog, char **  certificate)
Asynchronous finish function for Fapi_Quote
This function should be called after a previous Fapi_Quote_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
out	quoteInfo 	A JSON-encoded structure holding the inputs to the quote operation 	
out	signature 	The signature of the PCRs 	
out	signatureSize 	The size of the signature in bytes. May be NULL 	
out	pcrLog 	The log of the PCR. May be NULL 	
out	certificate 	The certificate associated with the signing key. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context, quoteInfor or signature is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	

Fapi_VerifyQuote
Functions
TSS2_RC Fapi_VerifyQuote (FAPI_CONTEXT *context, char const *publicKeyPath, uint8_t const *qualifyingData, size_t qualifyingDataSize, char const *quoteInfo, uint8_t const *signature, size_t signatureSize, char const *pcrLog)
TSS2_RC Fapi_VerifyQuote_Async (FAPI_CONTEXT *context, char const *publicKeyPath, uint8_t const *qualifyingData, size_t qualifyingDataSize, char const *quoteInfo, uint8_t const *signature, size_t signatureSize, char const *pcrLog)
TSS2_RC Fapi_VerifyQuote_Finish (FAPI_CONTEXT *context)

Detailed Description
FAPI functions to invoke VerifyQuote either as one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Fapi_VerifyQuote (FAPI_CONTEXT *  context, char const *  publicKeyPath, uint8_t const *  qualifyingData, size_t  qualifyingDataSize, char const *  quoteInfo, uint8_t const *  signature, size_t  signatureSize, char const *  pcrLog)
One-Call function for Fapi_VerifyQuote
Verifies that the data returned by a quote is valid.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	publicKeyPath 	The path to the signing key 	
in	qualifyingData 	The qualifying data nonce. May be NULL 	
in	qualifyingDataSize 	The size of qualifyingData in bytes. Must be 0 if qualifyingData is NULL 	
in	quoteInfo 	The quote information 	
in	signature 	The quote's signature 	
in	signatureSize 	The size of signature in bytes 	
in	pcrLog 	The PCR's log. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context, publicKeyPath, quoteInfo, or signature is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if path does not map to a FAPI entity. 	
TSS2_FAPI_RC_BAD_KEY 	if the entity at path is not a key, or is a key that is unsuitable for the requested operation. 	
TSS2_FAPI_RC_BAD_VALUE 	if quoteInfo, pcrEventLog, qualifyingData, or signature is invalid. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_SIGNATURE_VERIFICATION_FAILED 	if the signature could not be verified 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_RC Fapi_VerifyQuote_Async (FAPI_CONTEXT *  context, char const *  publicKeyPath, uint8_t const *  qualifyingData, size_t  qualifyingDataSize, char const *  quoteInfo, uint8_t const *  signature, size_t  signatureSize, char const *  pcrLog)
Asynchronous function for Fapi_VerifyQuote
Verifies that the data returned by a quote is valid. Call Fapi_VerifyQuote_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	publicKeyPath 	The path to the signing key 	
in	qualifyingData 	The qualifying data nonce. May be NULL 	
in	qualifyingDataSize 	The size of qualifyingData in bytes. Must be 0 if qualifyingData is NULL 	
in	quoteInfo 	The quote information 	
in	signature 	The quote's signature 	
in	signatureSize 	The size of signature in bytes 	
in	pcrLog 	The PCR's log. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context, publicKeyPath, quoteInfo, or signature is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if path does not map to a FAPI entity. 	
TSS2_FAPI_RC_BAD_KEY 	if the entity at path is not a key, or is a key that is unsuitable for the requested operation. 	
TSS2_FAPI_RC_BAD_VALUE 	if quoteInfo, pcrEventLog, qualifyingData, or signature is invalid. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_RC Fapi_VerifyQuote_Finish (FAPI_CONTEXT *  context)
Asynchronous finish function for Fapi_VerifyQuote
This function should be called after a previous Fapi_VerifyQuote_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_SIGNATURE_VERIFICATION_FAILED 	if the signature could not be verified 	

Fapi_CreateNv
Functions
TSS2_RC Fapi_CreateNv (FAPI_CONTEXT *context, char const *path, char const *type, size_t size, char const *policyPath, char const *authValue)
TSS2_RC Fapi_CreateNv_Async (FAPI_CONTEXT *context, char const *path, char const *type, size_t size, char const *policyPath, char const *authValue)
TSS2_RC Fapi_CreateNv_Finish (FAPI_CONTEXT *context)

Detailed Description
FAPI functions to invoke CreateNv either as one-call or in an asynchronous manner. 

Function Documentation
Fapi_CreateNv (FAPI_CONTEXT *  context, char const *  path, char const *  type, size_t  size, char const *  policyPath, char const *  authValue)
One-Call function for Fapi_CreateNv
This command creates an NV index in the TPM using a given path and type.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	path 	The path to the new NV index 	
in	type 	The intended type of the new NV index. May be NULL 	
in	size 	The size of the new NV index in bytes. May be 0 if the size is inferred from the type 	
in	policyPath 	The path to the policy that is associated with the new NV index. May be NULL 	
in	authValue 	The authorization value that is associated with the new NV index. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or path is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_PATH_ALREADY_EXISTS 	if an NV index already exists at path. 	
TSS2_FAPI_RC_BAD_VALUE 	if type is non-NULL but invalid or does not match the size. 	
TSS2_FAPI_RC_BAD_PATH 	if policyPath is non-NULL and does not map to a FAPI policy or if path dos not refer to a valid NV index path. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_NV_TOO_SMALL 	if too many NV handles are defined. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
Fapi_CreateNv_Async (FAPI_CONTEXT *  context, char const *  path, char const *  type, size_t  size, char const *  policyPath, char const *  authValue)
Asynchronous function for Fapi_CreateNv
This command creates an NV index in the TPM using a given path and type.
Call Fapi_CreateNv_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	path 	The path to the new NV index 	
in	type 	The intended type of the new NV index. May be NULL 	
in	size 	The size of the new NV index in bytes. May be 0 if the size is inferred from the type 	
in	policyPath 	The path to the policy that is associated with the new NV index. May be NULL 	
in	authValue 	The authorization value that is associated with the new NV index. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or path is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_PATH_ALREADY_EXISTS 	if an NV index already exists at path. 	
TSS2_FAPI_RC_BAD_VALUE 	if type is non-NULL but invalid or does not match the size. 	
TSS2_FAPI_RC_BAD_PATH 	if policyPath is non-NULL and does not map to a FAPI policy or if path dos not refer to a valid NV index path. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
Fapi_CreateNv_Finish (FAPI_CONTEXT *  context)
Asynchronous finish function for Fapi_CreateNv
This function should be called after a previous Fapi_CreateNv_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_PATH 	if a path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_NV_TOO_SMALL 	if too many NV handles are defined. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_PATH_ALREADY_EXISTS 	if the object already exists in object store. 	

Fapi_NvRead
Functions
TSS2_RC Fapi_NvRead (FAPI_CONTEXT *context, char const *path, uint8_t **data, size_t *size, char **logData)
TSS2_RC Fapi_NvRead_Async (FAPI_CONTEXT *context, char const *path)
TSS2_RC Fapi_NvRead_Finish (FAPI_CONTEXT *context, uint8_t **data, size_t *size, char **logData)

Detailed Description
FAPI functions to invoke NvRead either as one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Fapi_NvRead (FAPI_CONTEXT *  context, char const *  nvPath, uint8_t **  data, size_t *  size, char **  logData)
One-Call function for Fapi_NvRead
Reads data from an NV index within the TPM. The FAPI will automatically do the multiple reads if the NV index is larger than the TPM's TPM2_MAX_NV_BUFFER_SIZE.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	nvPath 	The path of the NV index to read 	
out	data 	The data that was read from the NV index 	
out	size 	The size of data in bytes. May be NULL 	
out	logData 	The log data of the NV index if the index is of type "extend". May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context, nvPath or data is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if nvPath is not found. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if authorization fails. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if don't know how to authenticate. 	
TSS2_FAPI_RC_NV_NOT_READABLE 	if the NV is not a readable index. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_RC Fapi_NvRead_Async (FAPI_CONTEXT *  context, char const *  nvPath)
Asynchronous function for Fapi_NvRead
Reads data from an NV index within the TPM. The FAPI will automatically do the multiple reads if the NV index is larger than the TPM's TPM2_MAX_NV_BUFFER_SIZE.
Call Fapi_NvRead_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	nvPath 	The path of the NV index to read	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or nvPath is NULL. * 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if nvPath is not found. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if authorization fails. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if don't know how to authenticate. 	
TSS2_FAPI_RC_NV_NOT_READABLE 	if the NV is not a readable index. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_RC Fapi_NvRead_Finish (FAPI_CONTEXT *  context, uint8_t **  data, size_t *  size, char **  logData)
Asynchronous finish function for Fapi_NvRead
This function should be called after a previous Fapi_NvRead_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
out	data 	The data that was read from the NV index 	
out	size 	The size of data in bytes. May be NULL 	
out	logData 	The log data of the NV index if the index is of type "extend". May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or data is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_BAD_PATH 	if a path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	

Fapi_NvWrite
Functions
TSS2_RC Fapi_NvWrite (FAPI_CONTEXT *context, char const *path, uint8_t const *data, size_t size)
TSS2_RC Fapi_NvWrite_Async (FAPI_CONTEXT *context, char const *path, uint8_t const *data, size_t size)
TSS2_RC Fapi_NvWrite_Finish (FAPI_CONTEXT *context)

Detailed Description
FAPI functions to invoke NvWrite either as one-call or in an asynchronous manner. 

Function Documentation
Fapi_NvWrite (FAPI_CONTEXT *  context, char const *  nvPath, uint8_t const *  data, size_t  size)
One-Call function for Fapi_NvWrite
Writes data to a "regular" (not pin, extend or counter) NV index.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	nvPath 	The path of the NV index to write 	
in	data 	The data to write to the NV index 	
in	size 	The size of data in bytes	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context, nvPath, or data is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if nvPath is not found. 	
TSS2_FAPI_RC_NV_EXCEEDED 	if the NV is not large enough for the data to be written. 	
TSS2_FAPI_RC_NV_WRONG_TYPE 	if the NV index is not a "regular" one. 	
TSS2_FAPI_RC_NV_NOT_WRITEABLE 	if the NV is not a writeable index. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if the policy is unknown. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
Fapi_NvWrite_Async (FAPI_CONTEXT *  context, char const *  nvPath, uint8_t const *  data, size_t  size)
Asynchronous function for Fapi_NvWrite
Writes data to a "regular" (not pin, extend or counter) NV index.
Call Fapi_NvWrite_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	nvPath 	The path of the NV index to write 	
in	data 	The data to write to the NV index 	
in	size 	The size of data in bytes	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context, nvPath, or data is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if nvPath is not found. 	
TSS2_FAPI_RC_NV_EXCEEDED 	if the NV is not large enough for the data to be written. 	
TSS2_FAPI_RC_NV_WRONG_TYPE 	if the NV index is not a "regular" one. 	
TSS2_FAPI_RC_NV_NOT_WRITEABLE 	if the NV is not a writeable index. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if the policy is unknown. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
Fapi_NvWrite_Finish (FAPI_CONTEXT *  context)
Asynchronous finish function for Fapi_NvWrite
This function should be called after a previous Fapi_NvWrite.
Parameters:
in,out	context 	The FAPI_CONTEXT	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_BAD_PATH 	if a path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	

Fapi_NvExtend
Functions
TSS2_RC Fapi_NvExtend (FAPI_CONTEXT *context, char const *path, uint8_t const *data, size_t size, char const *logData)
TSS2_RC Fapi_NvExtend_Async (FAPI_CONTEXT *context, char const *path, uint8_t const *data, size_t size, char const *logData)
TSS2_RC Fapi_NvExtend_Finish (FAPI_CONTEXT *context)

Detailed Description
FAPI functions to invoke NvExtend either as one-call or in an asynchronous manner. 

Function Documentation
TSS2_RC Fapi_NvExtend (FAPI_CONTEXT *  context, char const *  nvPath, uint8_t const *  data, size_t  dataSize, char const *  logData)
One-Call function for Fapi_NvExtend
Performs an extend operation on an NV index with the type extend.
Parameters:
in,out	context 	the FAPI context 	
in	nvPath 	The path to the NV index that is extended 	
in	data 	The data to extend on the NV index 	
in	dataSize 	The size of the data to extend. Must be smaller than 1024 	
in	logData 	A JSON representation of the data that is written to the event log. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context, nvPath, or data is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if nvPath is not found. 	
TSS2_FAPI_RC_NV_WRONG_TYPE 	if the NV is not an extendable index. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if the policy is unknown. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_RC Fapi_NvExtend_Async (FAPI_CONTEXT *  context, char const *  nvPath, uint8_t const *  data, size_t  dataSize, char const *  logData)
Asynchronous function for Fapi_NvExtend
Performs an extend operation on an NV index with the type extend.
Call Fapi_NvExtend_Finish to finish the execution of this command.
Parameters:
in,out	context 	the FAPI context 	
in	nvPath 	The path to the NV index that is extended 	
in	data 	The data to extend on the NV index 	
in	dataSize 	The size of the data to extend. Must be smaller than 1024 	
in	logData 	A JSON representation of the data that is written to the event log. May be NULL	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context, nvPath, or data is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_VALUE 	if dataSize is larger than 1024 	
TSS2_FAPI_RC_BAD_PATH 	if nvPath is not found. 	
TSS2_FAPI_RC_NV_WRONG_TYPE 	if the NV is not an extendable index. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if the policy is unknown. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_RC Fapi_NvExtend_Finish (FAPI_CONTEXT *  context)
Asynchronous finish function for Fapi_NvExtend
This function should be called after a previous Fapi_NvExtend.
Parameters:
in,out	context 	The FAPI_CONTEXT	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_BAD_PATH 	if a path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	

Fapi_NvIncrement
Functions
TSS2_RC Fapi_NvIncrement (FAPI_CONTEXT *context, char const *path)
TSS2_RC Fapi_NvIncrement_Async (FAPI_CONTEXT *context, char const *path)
TSS2_RC Fapi_NvIncrement_Finish (FAPI_CONTEXT *context)

Detailed Description
FAPI functions to invoke NvIncrement either as one-call or in an asynchronous manner. 

Function Documentation
Fapi_NvIncrement (FAPI_CONTEXT *  context, char const *  nvPath)
One-Call function for Fapi_NvIncrement
Increments an NV index that is a counter by 1.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	nvPath 	The path to the NV index that is incremented.	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or nvPath is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if nvPath is not found. 	
TSS2_FAPI_RC_NV_WRONG_TYPE 	if the NV index type is not TPM2_NT_COUNTER. 	
TSS2_FAPI_RC_NV_NOT_WRITEABLE 	if the NV index is not writeable. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if the policy is unknown. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
Fapi_NvIncrement_Async (FAPI_CONTEXT *  context, char const *  nvPath)
Asynchronous function for Fapi_NvIncrement
Increments an NV index that is a counter by 1.
Call Fapi_NvIncrement_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	nvPath 	The path to the NV index that is incremented.	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or nvPath is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if nvPath is not found. 	
TSS2_FAPI_RC_NV_WRONG_TYPE 	if the NV index type is not TPM2_NT_COUNTER. 	
TSS2_FAPI_RC_NV_NOT_WRITEABLE 	if the NV index is not writeable. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if the policy is unknown. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
Fapi_NvIncrement_Finish (FAPI_CONTEXT *  context)
Asynchronous finish function for Fapi_NvIncrement
This function should be called after a previous Fapi_NvIncrement_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_BAD_PATH 	if a path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	

Fapi_NvSetBits
Functions
TSS2_RC Fapi_NvSetBits (FAPI_CONTEXT *context, char const *path, uint64_t bitmap)
TSS2_RC Fapi_NvSetBits_Async (FAPI_CONTEXT *context, char const *path, uint64_t bitmap)
TSS2_RC Fapi_NvSetBits_Finish (FAPI_CONTEXT *context)

Detailed Description
FAPI functions to invoke NvSetBits either as one-call or in an asynchronous manner. 

Function Documentation
Fapi_NvSetBits (FAPI_CONTEXT *  context, char const *  nvPath, uint64_t  bitmap)
One-Call function for Fapi_NvSetBits
Sets bits in an NV index that was created as a bit field. Any number of bits from 0 to 64 may be SET.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	nvPath 	The path to the NV index where bits are set 	
in	bitmap 	The map of the bits to set	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or nvPath is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if nvPath is not found. 	
TSS2_FAPI_RC_NV_WRONG_TYPE 	if the NV index type is not TPM2_NT_COUNTER. 	
TSS2_FAPI_RC_NV_NOT_WRITEABLE 	if the NV is not a writeable index. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if the policy is unknown. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
Fapi_NvSetBits_Async (FAPI_CONTEXT *  context, char const *  nvPath, uint64_t  bitmap)
Asynchronous function for Fapi_NvSetBits
Sets bits in an NV index that was created as a bit field. Any number of bits from 0 to 64 may be SET.
Call Fapi_NvSetBits_Finish to finish the execution of this command.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	nvPath 	The path to the NV index where bits are set 	
in	bitmap 	The map of the bits to set	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or nvPath is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_PATH 	if nvPath is not found. 	
TSS2_FAPI_RC_NV_WRONG_TYPE 	if the NV index type is not TPM2_NT_COUNTER. 	
TSS2_FAPI_RC_NV_NOT_WRITEABLE 	if the NV is not a writeable index. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if the policy is unknown. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
Fapi_NvSetBits_Finish (FAPI_CONTEXT *  context)
Asynchronous finish function for Fapi_NnSetBits
This function should be called after a previous Fapi_NvSetBIts_Async.
Parameters:
in,out	context 	The FAPI_CONTEXT	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	

Fapi_SetAuthCB
Typedefs
typedef TSS2_RC(* Fapi_CB_Auth) (char const *objectPath, char const *description, char const **auth, void *userData)
Functions
TSS2_RC Fapi_SetAuthCB (FAPI_CONTEXT *context, Fapi_CB_Auth callback, void *userData)

Detailed Description
FAPI functions to invoke SetAuthCB. 

Function Documentation
Fapi_SetAuthCB (FAPI_CONTEXT *  context, Fapi_CB_Auth  callback, void *  userData)
This function registers an application-defined function as a callback to allow the TSS to get authorization values from the application.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	callback 	The callback function for auth value retrieval 	
in	userData 	A pointer that is provided to all callback invocations	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if the context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the synchronous or Async functions are called while the context has another asynchronous operation outstanding, or the Finish function is called while the context does not have an appropriate asynchronous operation outstanding. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	

Fapi_SetBranchCB
Typedefs
typedef TSS2_RC(* Fapi_CB_Branch) (char const *objectPath, char const *description, char const **branchNames, size_t numBranches, size_t *selectedBranch, void *userData)
Functions
TSS2_RC Fapi_SetBranchCB (FAPI_CONTEXT *context, Fapi_CB_Branch callback, void *userData)

Detailed Description
FAPI functions to invoke SetBranchCB. 

Function Documentation
Fapi_SetBranchCB (FAPI_CONTEXT *  context, Fapi_CB_Branch  callback, void *  userData)
This function registers a callback that will be invoked whenever the FAPI has to decide which branch of a Policy-OR policy to use to authorize a particular FAPI operation.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	callback 	The callback function for branch selection 	
in	userData 	A pointer that is provided to all callback invocations	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if the context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the synchronous or Async functions are called while the context has another asynchronous operation outstanding, or the Finish function is called while the context does not have an appropriate asynchronous operation outstanding. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	

Fapi_SetSignCB
Typedefs
typedef TSS2_RC(* Fapi_CB_Sign) (char const *objectPath, char const *description, char const *publicKey, char const *publicKeyHint, uint32_t hashAlg, uint8_t const *dataToSign, size_t dataToSignSize, uint8_t const **signature, size_t *signatureSize, void *userData)
typedef TSS2_RC(* Fapi_CB_PolicyAction) (char const *objectPath, char const *action, void *userData)
Functions
TSS2_RC Fapi_SetSignCB (FAPI_CONTEXT *context, Fapi_CB_Sign callback, void *userData)
TSS2_RC Fapi_SetPolicyActionCB (FAPI_CONTEXT *context, Fapi_CB_PolicyAction callback, void *userData)

Detailed Description
FAPI functions to invoke SetSignCB. 

Function Documentation
Fapi_SetPolicyActionCB (FAPI_CONTEXT *  context, Fapi_CB_PolicyAction  callback, void *  userData)
Fapi_SetActionCB() registers an application-defined function as a callback that shall be called back upon encountering a policy action element.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	callback 	The callback function for branch selection 	
in	userData 	A pointer that is provided to all callback invocations	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if the context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the synchronous or Async functions are called while the context has another asynchronous operation outstanding, or the Finish function is called while the context does not have an appropriate asynchronous operation outstanding. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	
Fapi_SetSignCB (FAPI_CONTEXT *  context, Fapi_CB_Sign  callback, void *  userData)
Fapi_SetSignCB() registers an application-defined function as a callback to allow the FAPI to get signatures authorizing use of TPM objects.
Parameters:
in,out	context 	The FAPI_CONTEXT 	
in	callback 	The callback function for signing selection 	
in	userData 	A pointer that is provided to all callback invocations	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if the context is NULL. 	
TSS2_FAPI_RC_BAD_CONTEXT 	if context corruption is detected. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the synchronous or Async functions are called while the context has another asynchronous operation outstanding, or the Finish function is called while the context does not have an appropriate asynchronous operation outstanding. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be saved. 	

Internals of Feature API
Modules
Internal Cryptographic Backend
Policy instantiation module
Policy calculation module
Policy callback functions.
Policy execution functions.
Policy utilitiy module
Helper functions module
Utility module
Basic IO module
Key store module
Policy store module
Configuration utilities.
Event log utilities.
Profile module
FAPI object serialization module
FAPI object deserialization module
Vendor specific module

Detailed Description
This module holds internal APIs of the FAPI implementation.
Async programming style:
The tss2-fapi implementation uses an asynchronous programming style internally. This means that whenever a piece of code performs a potentially blocking operation it will instead return TSS2_FAPI_RC_TRY_AGAIN (similarly to ESAPI). Then this function is called again once the Poll returns ok. In order to carry the state of execution information over between the different invocation of the same function, the current state is stored in a state variable and all variables are stored in some kind of context variables. On the next entry to the function the state is evaluated using a swtich() statement and execution is resumed.
In order to understand the functional flow of code in FAPI, one can read the functions continuously over all fallthrough; and statecase(); statements. The statecase statements are the re-entry points of each function. The return_try_again() and FAPI_SYNC() statements are the preempt statements. 

Internal Cryptographic Backend
Functions
TSS2_RC get_crl_from_cert (X509 *cert, X509_CRL **crl)
TSS2_RC ifapi_cert_to_pem (const uint8_t *certBuffer, size_t certBufferSize, char **pemCert, TPM2_ALG_ID *certAlgorithmId, TPM2B_PUBLIC *tpmPublic)
void ifapi_crypto_hash_abort (IFAPI_CRYPTO_CONTEXT_BLOB **context)
TSS2_RC ifapi_crypto_hash_finish (IFAPI_CRYPTO_CONTEXT_BLOB **context, uint8_t *digest, size_t *digestSize)
TSS2_RC ifapi_crypto_hash_start (IFAPI_CRYPTO_CONTEXT_BLOB **context, TPM2_ALG_ID hashAlgorithm)
TSS2_RC ifapi_crypto_hash_update (IFAPI_CRYPTO_CONTEXT_BLOB *context, const uint8_t *buffer, size_t size)
TSS2_RC ifapi_der_sig_to_tpm (const TPMT_PUBLIC *tpmPublic, const unsigned char *signature, size_t signatureSize, TPMI_ALG_HASH hashAlgorithm, TPMT_SIGNATURE *tpmSignature)
TSS2_RC ifapi_get_hash_alg_for_size (uint16_t size, TPMI_ALG_HASH *hashAlgorithm)
TPM2_RC ifapi_get_profile_sig_scheme (const IFAPI_PROFILE *profile, const TPMT_PUBLIC *tpmPublic, TPMT_SIG_SCHEME *signatureScheme)
TSS2_RC ifapi_get_public_from_pem_cert (const char *pem_cert, TPM2B_PUBLIC *tpm_public)
TPM2_ALG_ID ifapi_get_signature_algorithm_from_pem (const char *pemKey)
TSS2_RC ifapi_get_tpm2b_public_from_pem (const char *pemKey, TPM2B_PUBLIC *tpmPublic)
TSS2_RC ifapi_get_tpm_key_fingerprint (const TPM2B_PUBLIC *tpmPublicKey, TPMI_ALG_HASH hashAlg, TPM2B_DIGEST *fingerprint)
size_t ifapi_hash_get_digest_size (TPM2_ALG_ID hashAlgorithm)
TSS2_RC ifapi_initialize_sign_public (TPM2_ALG_ID signatureAlgorithm, TPM2B_PUBLIC *public)
TSS2_RC ifapi_pub_pem_key_from_tpm (const TPM2B_PUBLIC *tpmPublicKey, char **pemKey, int *pemKeySize)
TSS2_RC ifapi_tpm_ecc_sig_to_der (const TPMT_SIGNATURE *tpmSignature, uint8_t **signature, size_t *signatureSize)
TSS2_RC ifapi_verify_ek_cert (char *root_cert_pem, char *intermed_cert_pem, char *ek_cert_pem)
TSS2_RC ifapi_verify_signature (const IFAPI_OBJECT *keyObject, const uint8_t *signature, size_t signatureSize, const uint8_t *digest, size_t digestSize)
TSS2_RC ifapi_verify_signature_quote (const IFAPI_OBJECT *keyObject, const uint8_t *signature, size_t signatureSize, const uint8_t *digest, size_t digestSize, const TPMT_SIG_SCHEME *signatureScheme)

Detailed Description
The types and functions used internally by FAPI for cryptographic operations. Multiple implementations of these functions for different cryptographic backends may exist. 

Function Documentation
TSS2_RC get_crl_from_cert (X509 *  cert, X509_CRL **  crl)
Get url to download crl from certificate. 
Return values:
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_NO_CERT 	if an error did occur during certificate downloading. 	
TSS2_RC ifapi_cert_to_pem (const uint8_t *  certBuffer, size_t  certBufferSize, char **  pemCert, TPM2_ALG_ID *  certAlgorithmId, TPM2B_PUBLIC *  tpmPublic)
Converts a TPM certificate buffer to the PEM format.
Parameters:
in	certBuffer 	A byte buffer holding the certificate 	
in	certBufferSize 	The size of certBuffer in bytes 	
out	pemCert 	A byte buffer where the PEM-formatted certificate is stored 	
out	certAlgorithmId 	The key type of the certified key 	
out	tpmPublic 	The public key of the certificate in TPM format.	
Return values:
TSS2_RC_SUCCESS 	on success 	
TSS2_FAPI_RC_BAD_REFERENCE 	if certBuffer or pemCert is NULL 	
TSS2_FAPI_RC_MEMORY 	if memory could not be allocated 	
TSS2_FAPI_RC_BAD_VALUE 	if the certificate is invalid 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an error occurs in the crypto library 	
void ifapi_crypto_hash_abort (IFAPI_CRYPTO_CONTEXT_BLOB **  context)
Aborts a hash operation and finalizes the hash context. It will be set to NULL.
Parameters:
in,out	context 	The context of the digest object. 	
TSS2_RC ifapi_crypto_hash_finish (IFAPI_CRYPTO_CONTEXT_BLOB **  context, uint8_t *  digest, size_t *  digestSize)
Gets the digest value from a hash context and closes it.
Parameters:
in,out	context 	The hash context that is released 	
out	digest 	The buffer for the digest value 	
out	digestSize 	The size of digest in bytes. Can be NULL	
Return values:
TSS2_RC_SUCCESS 	on success 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or digest is NULL 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an error occurs in the crypto library 	
TSS2_RC ifapi_crypto_hash_start (IFAPI_CRYPTO_CONTEXT_BLOB **  context, TPM2_ALG_ID  hashAlgorithm)
Starts the computation of a hash digest.
Parameters:
out	context 	The created hash context (callee-allocated). 	
in	hashAlgorithm 	The TSS hash identifier for the hash algorithm to use.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_VALUE 	if hashAlgorithm is invalid 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL 	
TSS2_FAPI_RC_MEMORY 	if memory cannot be allocated 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an error occurs in the crypto library 	
TSS2_RC ifapi_crypto_hash_update (IFAPI_CRYPTO_CONTEXT_BLOB *  context, const uint8_t *  buffer, size_t  size)
Updates the digest value of a hash object with data from a byte buffer.
Parameters:
in,out	context 	The hash context that will be updated 	
in	buffer 	The data for the update 	
in	size 	The size of data in bytes	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	for invalid parameters. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an error occurs in the crypto library 	
TSS2_RC ifapi_der_sig_to_tpm (const TPMT_PUBLIC *  tpmPublic, const unsigned char *  signature, size_t  signatureSize, TPMI_ALG_HASH  hashAlgorithm, TPMT_SIGNATURE *  tpmSignature)
Convert signature from DER to TPM format.
The signature in DER format is converted to TPM format to enable verification by the TPM.
Parameters:
in	tpmPublic 	The public information of the signature key 	
in	signature 	A byte buffer holding the DER encoded signature 	
in	signatureSize 	The size of signature in bytes 	
in	hashAlgorithm 	The TSS identifier for the hash algorithm used to compute the digest 	
out	tpmSignature 	The signature in TPM format	
Return values:
TSS2_RC_SUCCESS 	on success 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an error occurs in the crypto library 	
TSS2_FAPI_RC_BAD_REFERENCE 	if tpmPublic, signature or tpmSignature is NULL 	
TSS2_FAPI_RC_MEMORY 	if memory could not be allocated 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_RC ifapi_get_hash_alg_for_size (uint16_t  size, TPMI_ALG_HASH *  hashAlgorithm)
Returns a suitable hash algorithm for a given digest size.
Parameters:
in	size 	The size of the digest 	
out	hashAlgorithm 	A suitable hash algorithm for the digest size	
Return values:
TSS2_RC_SUCCESS 	on success 	
TSS2_FAPI_RC_BAD_REFERENCE 	if hashAlgorithm is NULL 	
TSS2_FAPI_RC_BAD_VALUE 	if the digest size is invalid 	
TPM2_RC ifapi_get_profile_sig_scheme (const IFAPI_PROFILE *  profile, const TPMT_PUBLIC *  tpmPublic, TPMT_SIG_SCHEME *  signatureScheme)
Returns the signature scheme that is currently used in the FAPI context.
Parameters:
in	profile 	The FAPI profile from which the signing scheme is retrieved 	
in	tpmPublic 	The public key for which the signing key is fetched from the FAPI 	
out	signatureScheme 	The currently used signature scheme	
Return values:
TSS2_RC_SUCCESS 	if the signature scheme was successfully fetched 	
TSS2_FAPI_RC_BAD_REFERENCE 	if one of the parameters is NULL 	
TSS2_FAPI_RC_BAD_VALUE 	if the key type is not TPM2_ALG_RSA or TPM2_ALG_ECC 	
TSS2_RC ifapi_get_public_from_pem_cert (const char *  pem_cert, TPM2B_PUBLIC *  tpm_public)
Get public information for key of a pem certificate.
Parameters:
in	pem_cert 	The pem certificate. 	
out	tpm_public 	The public information of the key in TPM format.	
Return values:
TSS2_RC_SUCCESS 	on success 	
TSS2_FAPI_RC_BAD_VALUE 	if the conversion fails. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if openssl errors occur. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TPM2_ALG_ID ifapi_get_signature_algorithm_from_pem (const char *  pemKey)
Returns the TPM algorithm identifier that matches to the signature algorithm of a given PEM key.
Parameters:
in	pemKey 	The public key from which the signature algorithm is retrieved	
Return values:
TPM2_ALG_RSA 	if pemKey holds an RSA key 	
TPM2_ALG_ECC 	if pemKey holds an ECC key 	
TPM2_ALG_ERROR 	if the signature algorithm could not be determined 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_RC ifapi_get_tpm2b_public_from_pem (const char *  pemKey, TPM2B_PUBLIC *  tpmPublic)
Gets an object with the TPM-relevant public information of a PEM encoded public key. The information is gathered from the key itself and the currently used FAPI profile.
Parameters:
in	pemKey 	A byte buffer holding the PEM encoded public key for which the public information is retrieved 	
out	tpmPublic 	The public information of pemKey	
Return values:
TSS2_RC_SUCCESS 	on success 	
TSS2_FAPI_RC_BAD_REFERENCE 	if profile, pemKey or tpmPublic is NULL 	
TSS2_FAPI_RC_MEMORY 	if memory could not be allocated 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an error occurs in the crypto library 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_RC ifapi_get_tpm_key_fingerprint (const TPM2B_PUBLIC *  tpmPublicKey, TPMI_ALG_HASH  hashAlg, TPM2B_DIGEST *  fingerprint)
Compute the fingerprint of a TPM public key.
Parameters:
in	tpmPublicKey 	The public key created by the TPM 	
in	hashAlg 	The hash algorithm used for fingerprint computation. 	
out	fingerprint 	The fingerprint digest.	
Return values:
TSS2_RC_SUCCESS 	on success 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an error occurs in the crypto library 	
TSS2_FAPI_RC_MEMORY 	if memory could not be allocated 	
TSS2_FAPI_BAD_REFERENCE 	if tpmPublicKey or pemKeySize are NULL 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
size_t ifapi_hash_get_digest_size (TPM2_ALG_ID  hashAlgorithm)
Returns the digest size of a given hash algorithm.
Parameters:
in	hashAlgorithm 	The TSS identifier of the hash algorithm	
Returns:
The size of the digest produced by the hash algorithm if hashAlgorithm is valid 
Return values:
0 	if hashAlgorithm is invalid 	
TSS2_RC ifapi_initialize_sign_public (TPM2_ALG_ID  signatureAlgorithm, TPM2B_PUBLIC *  public)
Initializes a FAPI key template for a given signature algorithm.
Parameters:
in	signatureAlgorithm 	The signature algorithm to use. Must be TPM2_ALG_RSA or TPM2_ALG_ECC 	
out	public 	The template to initialize	
Return values:
TSS2_RC_SUCCESS 	on success 	
TSS2_FAPI_RC_BAD_REFERENCE 	if template is NULL 	
TSS2_FAPI_RC_BAD_VALUE 	if signatureAlgorithm is not TPM2_ALG_RSA or TPM2_ALG_ECC 	
TSS2_RC ifapi_pub_pem_key_from_tpm (const TPM2B_PUBLIC *  tpmPublicKey, char **  pemKey, int *  pemKeySize)
Convert a TPM public key into a PEM formatted byte buffer. This can be used by TLS libraries.
Parameters:
in	tpmPublicKey 	The public key created by the TPM 	
out	pemKey 	A byte buffer that will hold the PEM representation of the public key (callee allocated) 	
out	pemKeySize 	The size of pemKey in bytes	
Return values:
TSS2_RC_SUCCESS 	on success 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an error occurs in the crypto library 	
TSS2_FAPI_RC_MEMORY 	if memory could not be allocated 	
TSS2_FAPI_BAD_REFERENCE 	if tpmPublicKey or pemKeySize are NULL 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_RC ifapi_tpm_ecc_sig_to_der (const TPMT_SIGNATURE *  tpmSignature, uint8_t **  signature, size_t *  signatureSize)
Convert a TPM ECDSA signature into a DER formatted byte buffer. This can be used by TLS libraries.
Parameters:
in	tpmSignature 	The signature created by the TPM 	
out	signature 	A byte buffer that will hold the DER representation of the signature (callee allocated) 	
out	signatureSize 	The size of signature in bytes. May be NULL	
Return values:
TSS2_RC_SUCCESS 	on success 	
TSS2_FAPI_RC_BAD_REFERENCE 	if tpmSignature is NULL 	
TSS2_FAPI_RC_MEMORY 	if memory could not be allocated 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an error occurs in the crypto library 	
TSS2_RC ifapi_verify_ek_cert (char *  root_cert_pem, char *  intermed_cert_pem, char *  ek_cert_pem)
Verify EK certificate read from TPM.
Parameters:
in	root_cert_pem 	The vendor root certificate. 	
in	intermed_cert_pem 	The vendor intermediate certificate. 	
in	ek_cert_pem 	The ek certificate from TPM.	
Return values:
TSS2_RC_SUCCESS 	on success 	
TSS2_FAPI_RC_BAD_VALUE 	if the verification was no successful. 	
TSS2_FAPI_RC_NO_CERT 	if an error did occur during certificate downloading. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_verify_signature (const IFAPI_OBJECT *  keyObject, const uint8_t *  signature, size_t  signatureSize, const uint8_t *  digest, size_t  digestSize)
Verifies a signature using a given FAPI public key.
Parameters:
in	keyObject 	The FAPI public key used for verification 	
in	signature 	The signature to verify 	
in	signatureSize 	The size of signature in bytes 	
in	digest 	The digest of the signature 	
in	digestSize 	The size of digest in bytes	
Return values:
TSS2_RC_SUCCESS 	In case of success 	
TSS2_FAPI_RC_BAD_REFERENCE 	if keyObject, signature or digest is NULL 	
TSS2_FAPI_RC_BAD_VALUE 	if the type of the key is wrong 	
TSS2_FAPI_RC_MEMORY 	if memory could not be allocated 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an error occurs in the crypto library 	
TSS2_FAPI_RC_SIGNATURE_VERIFICATION_FAILED 	if the verification of the signature fails 	
TSS2_RC ifapi_verify_signature_quote (const IFAPI_OBJECT *  keyObject, const uint8_t *  signature, size_t  signatureSize, const uint8_t *  digest, size_t  digestSize, const TPMT_SIG_SCHEME *  signatureScheme)
Verifies the signature created by a Quote command.
Parameters:
in	keyObject 	A FAPI key with which the signature is verified 	
in	signature 	A byte buffer holding the signature 	
in	signatureSize 	The size of signature in bytes 	
in	digest 	The digest of the signature 	
in	digestSize 	The size of digest in bytes 	
in	signatureScheme 	The signature scheme	
Return values:
TSS2_RC_SUCCESS 	on success 	
TSS2_FAPI_RC_BAD_REFERENCE 	if keyObject, signature, digest or signatureScheme is NULL 	
TSS2_FAPI_RC_MEMORY 	if memory could not be allocated 	
TSS2_FAPI_RC_BAD_VALUE 	if the PEM encoded key could not be decoded 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an error occurs in the crypto library 	
TSS2_FAPI_RC_SIGNATURE_VERIFICATION_FAILED 	if the verification of the signature fails 	

Policy instantiation module
Functions
TSS2_RC ifapi_policyeval_instantiate_async (IFAPI_POLICY_EVAL_INST_CTX *context, TPMS_POLICY *policy, ifapi_policyeval_INST_CB *callbacks)
TSS2_RC ifapi_policyeval_instantiate_finish (IFAPI_POLICY_EVAL_INST_CTX *context)

Detailed Description
Provides functions for instantiation of the policies. The defaults will be initialized according to the given values. 

Function Documentation
TSS2_RC ifapi_policyeval_instantiate_async (IFAPI_POLICY_EVAL_INST_CTX *  context, TPMS_POLICY *  policy, ifapi_policyeval_INST_CB *  callbacks)
Prepare instantiation a policy template.
Parts of policies which are referenced by object paths will be replaced with the appropriate values of the referenced objects.
Parameters:
in	context 	The context storing information for re-entry after try again. 	
in	policy 	The policy to be instantiated. 	
in	callbacks 	The needed callback functions with the corresponding user data which will be passed to the callback. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
FAPI 	error codes on failure 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_policyeval_instantiate_finish (IFAPI_POLICY_EVAL_INST_CTX *  context)
Finalize instantiation a policy template.
All needed asyncroous callbacks will be executed for all policy elements offset The policy.
Parameters:
in	context 	The context storing information for re-entry after try again. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_TEMPLATE 	If the templayte is not complete for instantiation. 	
FAPI 	error codes on failure 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_IO_ERROR 	if an error occurred while accessing the object store. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	

Policy calculation module
Functions
TSS2_RC ifapi_calculate_tree (FAPI_CONTEXT *context, const char *policyPath, TPMS_POLICY *policy, TPMI_ALG_HASH hash_alg, size_t *digest_idx, size_t *hash_size)
TSS2_RC ifapi_calculate_policy (TPML_POLICYELEMENTS *policy, TPML_DIGEST_VALUES *policyDigests, TPMI_ALG_HASH hash_alg, size_t hash_size, size_t digest_idx)
TSS2_RC ifapi_calculate_policy_authorize (TPMS_POLICYAUTHORIZE *policy, TPML_DIGEST_VALUES *current_digest, TPMI_ALG_HASH current_hash_alg)
TSS2_RC ifapi_calculate_policy_authorize_nv (TPMS_POLICYAUTHORIZENV *policy, TPML_DIGEST_VALUES *current_digest, TPMI_ALG_HASH current_hash_alg)
TSS2_RC ifapi_calculate_policy_command_code (TPMS_POLICYCOMMANDCODE *policy, TPML_DIGEST_VALUES *current_digest, TPMI_ALG_HASH current_hash_alg)
TSS2_RC ifapi_calculate_policy_counter_timer (TPMS_POLICYCOUNTERTIMER *policy, TPML_DIGEST_VALUES *current_digest, TPMI_ALG_HASH current_hash_alg)
TSS2_RC ifapi_calculate_policy_cp_hash (TPMS_POLICYCPHASH *policy, TPML_DIGEST_VALUES *current_digest, TPMI_ALG_HASH current_hash_alg)
TSS2_RC ifapi_calculate_policy_digest_hash (TPM2B_DIGEST *digest, TPML_DIGEST_VALUES *current_digest, TPMI_ALG_HASH current_hash_alg, TPM2_CC command_code)
TSS2_RC ifapi_calculate_policy_duplicate (TPMS_POLICYDUPLICATIONSELECT *policy, TPML_DIGEST_VALUES *current_digest, TPMI_ALG_HASH current_hash_alg)
TSS2_RC ifapi_calculate_policy_locality (TPMS_POLICYLOCALITY *policy, TPML_DIGEST_VALUES *current_digest, TPMI_ALG_HASH current_hash_alg)
TSS2_RC ifapi_calculate_policy_name_hash (TPMS_POLICYNAMEHASH *policy, TPML_DIGEST_VALUES *current_digest, TPMI_ALG_HASH current_hash_alg)
TSS2_RC ifapi_calculate_policy_nv (TPMS_POLICYNV *policy, TPML_DIGEST_VALUES *current_digest, TPMI_ALG_HASH current_hash_alg)
TSS2_RC ifapi_calculate_policy_nv_written (TPMS_POLICYNVWRITTEN *policy, TPML_DIGEST_VALUES *current_digest, TPMI_ALG_HASH current_hash_alg)
TSS2_RC ifapi_calculate_policy_or (TPMS_POLICYOR *policyOr, TPML_DIGEST_VALUES *current_digest, TPMI_ALG_HASH hash_alg, size_t hash_size, size_t digest_idx)
TSS2_RC ifapi_calculate_policy_secret (TPMS_POLICYSECRET *policy, TPML_DIGEST_VALUES *current_digest, TPMI_ALG_HASH current_hash_alg)
TSS2_RC ifapi_calculate_policy_signed (TPMS_POLICYSIGNED *policy, TPML_DIGEST_VALUES *current_digest, TPMI_ALG_HASH current_hash_alg)
TSS2_RC ifapi_calculate_simple_policy (TPM2_CC command_code1, TPM2_CC command_code2, TPML_DIGEST_VALUES *current_digest, TPMI_ALG_HASH current_hash_alg)
TSS2_RC ifapi_compute_policy_pcr (TPMS_POLICYPCR *policy, TPML_DIGEST_VALUES *current_digest, TPMI_ALG_HASH current_hash_alg)

Detailed Description
Provides functions for policy calculation (without TPM). 

Function Documentation
TSS2_RC ifapi_calculate_policy (TPML_POLICYELEMENTS *  policy, TPML_DIGEST_VALUES *  policyDigests, TPMI_ALG_HASH  hash_alg, size_t  hash_size, size_t  digest_idx)
Compute policy digest for a list of policies.
Every policy in the list will update the previous policy. Thus the final policy digest will describe the sequential execution of the policy list.
Parameters:
in	policy 	The policy with the policy list. 	
in,out	policyDigests 	The digest list which has to be updated. 	
in	hash_alg 	The hash algorithm used for the policy computation. 	
in	hash_size 	The size of the policy digest. 	
in	digest_idx 	The index of the current policy in the passed digest list.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_calculate_policy_authorize (TPMS_POLICYAUTHORIZE *  policy, TPML_DIGEST_VALUES *  current_digest, TPMI_ALG_HASH  current_hash_alg)
Calculate a policy digest for a placeholder policy.
The placeholder policy can be extended during execution by a signed policy, which can be verified by using the parameters of this placeholder policy. Based on the command code, the key name of the signing key and a policy reference the new policy digest is computed by the function calculate_policy_key_param().
Parameters:
in	policy 	The policy with the name of the public key and the policy reference. 	
in,out	current_digest 	The digest list which has to be updated. 	
in	current_hash_alg 	The hash algorithm used for the policy computation.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_calculate_policy_authorize_nv (TPMS_POLICYAUTHORIZENV *  policy, TPML_DIGEST_VALUES *  current_digest, TPMI_ALG_HASH  current_hash_alg)
Calculate a policy digest for a policy stored in an approved NV index.
Based on the command code, and the computed NV name the new policy digest is computed by the function calculate_policy_key_param().
Parameters:
in	policy 	The policy with the public information of the NV index. 	
in,out	current_digest 	The digest list which has to be updated. 	
in	current_hash_alg 	The hash algorithm used for the policy computation.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_RC ifapi_calculate_policy_command_code (TPMS_POLICYCOMMANDCODE *  policy, TPML_DIGEST_VALUES *  current_digest, TPMI_ALG_HASH  current_hash_alg)
Update policy command code with a command code defined in the policy.
For the update two command codes will be used. The command code of policy command code and the passed command code. The policy will be updated with the function ifapi_calculate_simple_policy()
Parameters:
in	policy 	The policy command code with the second command code. 	
in,out	current_digest 	The digest list which has to be updated. 	
in	current_hash_alg 	The hash algorithm used for the policy computation.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_calculate_policy_counter_timer (TPMS_POLICYCOUNTERTIMER *  policy, TPML_DIGEST_VALUES *  current_digest, TPMI_ALG_HASH  current_hash_alg)
Calculate a policy for for comparing current TPM timers with the policy.
The timer value and the operation for comparison defined in the policy will bu used to update the policy digest. The offset which is supported by the TPM policy for FAPI will be 0.
Parameters:
in	policy 	The policy with the timer value and the operation for comparison. 	
in,out	current_digest 	The digest list which has to be updated. 	
in	current_hash_alg 	The hash algorithm used for the policy computation.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_calculate_policy_cp_hash (TPMS_POLICYCPHASH *  policy, TPML_DIGEST_VALUES *  current_digest, TPMI_ALG_HASH  current_hash_alg)
Compute policy bound to a specific command and command parameters.
The cp hash value and the command code will be updated by the function ifapi_calculate_policy_digest_hash().
Parameters:
in	policy 	The policy with the cp hash value. 	
in,out	current_digest 	The digest list which has to be updated. 	
in	current_hash_alg 	The hash algorithm used for the policy computation.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_calculate_policy_digest_hash (TPM2B_DIGEST *  digest, TPML_DIGEST_VALUES *  current_digest, TPMI_ALG_HASH  current_hash_alg, TPM2_CC  command_code)
Compute policy if only a digest and a command code are needed for extension.
Parameters:
in	digest 	the digest which will be used for policy extension. 	
in,out	current_digest 	The digest list which has to be updated. 	
in	current_hash_alg 	The hash algorithm used for the policy computation. 	
in	command_code 	The compute of the command which did compute the digest.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_calculate_policy_duplicate (TPMS_POLICYDUPLICATIONSELECT *  policy, TPML_DIGEST_VALUES *  current_digest, TPMI_ALG_HASH  current_hash_alg)
Calculate a policy digest to allow duplication force a selected new parent.
Based on the command code, the name of the new parent, and the include object switch the new policy digest is computed.
Parameters:
in	policy 	The policy with the new parent information. 	
in,out	current_digest 	The digest list which has to be updated. 	
in	current_hash_alg 	The hash algorithm used for the policy computation.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_calculate_policy_locality (TPMS_POLICYLOCALITY *  policy, TPML_DIGEST_VALUES *  current_digest, TPMI_ALG_HASH  current_hash_alg)
Compute policy which limits authorization to a specific locality.
Parameters:
in	policy 	The policy with the locality. 	
in,out	current_digest 	The digest list which has to be updated. 	
in	current_hash_alg 	The hash algorithm used for the policy computation.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_calculate_policy_name_hash (TPMS_POLICYNAMEHASH *  policy, TPML_DIGEST_VALUES *  current_digest, TPMI_ALG_HASH  current_hash_alg)
Compute policy bound to a specific set of TPM entities.
The policy digest will be updated with the function ifapi_calculate_policy_digest_hash() which will add the hash of the entity name list.
Parameters:
in	policy 	The policy with the list of entity names. 	
in,out	current_digest 	The digest list which has to be updated. 	
in	current_hash_alg 	The hash algorithm used for the policy computation.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_calculate_policy_nv (TPMS_POLICYNV *  policy, TPML_DIGEST_VALUES *  current_digest, TPMI_ALG_HASH  current_hash_alg)
Compute policy bound to the content of an NV index.
The value used for comparison, the compare operation and an offset for the NV index are part of the policy.
Parameters:
in	policy 	The policy with the expected values used for comparison. 	
in,out	current_digest 	The digest list which has to be updated. 	
in	current_hash_alg 	The hash algorithm used for the policy computation.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_RC ifapi_calculate_policy_nv_written (TPMS_POLICYNVWRITTEN *  policy, TPML_DIGEST_VALUES *  current_digest, TPMI_ALG_HASH  current_hash_alg)
Compute policy bound to bound to the TPMA_NV_WRITTEN attributes.
The expected value of the NV written attribute is part of the policy.
Parameters:
in	policy 	The policy with the expected attribute value. 	
in,out	current_digest 	The digest list which has to be updated. 	
in	current_hash_alg 	The hash algorithm used for the policy computation.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_calculate_policy_or (TPMS_POLICYOR *  policyOr, TPML_DIGEST_VALUES *  current_digest, TPMI_ALG_HASH  hash_alg, size_t  hash_size, size_t  digest_idx)
Compute a list of policies to enable authorization options.
First the policy digest will be computed for every branch. After that the policy digest will be reset to zero and extended by the list of computed policy digests of the branches.
Parameters:
in	policyOr 	The policy with the possible policy branches. 	
in,out	current_digest 	The digest list which has to be updated. 	
in	hash_alg 	The hash algorithm used for the policy computation. 	
in	hash_size 	The size of the policy digest. 	
in	digest_idx 	The index of the current policy in the passed digest list.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_calculate_policy_secret (TPMS_POLICYSECRET *  policy, TPML_DIGEST_VALUES *  current_digest, TPMI_ALG_HASH  current_hash_alg)
Calculate a policy for adding secret-based authorization.
During execution proving the knowledge of the secrect auth value of a certain object is required. The name of this object and a policy reference is used for policy calculation. Based on the command code, the object name and a policy reference the new policy digest is computed by the function calculate_policy_key_param().
Parameters:
in	policy 	The policy with the object name of the object to be authorized and the policy reference. 	
in,out	current_digest 	The digest list which has to be updated. 	
in	current_hash_alg 	The hash algorithm used for the policy computation.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_calculate_policy_signed (TPMS_POLICYSIGNED *  policy, TPML_DIGEST_VALUES *  current_digest, TPMI_ALG_HASH  current_hash_alg)
Calculate a policy digest for a signed policy.
Based on the command code, the public key, and the policy reference stored in the policy the new policy digest is computed by the function calculate_policy_key_param().
Parameters:
in	policy 	The policy with the public key and the policy reference. 	
in,out	current_digest 	The digest list which has to be updated. 	
in	current_hash_alg 	The hash algorithm used for the policy computation.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_calculate_simple_policy (TPM2_CC  command_code1, TPM2_CC  command_code2, TPML_DIGEST_VALUES *  current_digest, TPMI_ALG_HASH  current_hash_alg)
Update policy if only the command codes are used.
Some simple policies use onle one or two command codes for policy calculation.
Parameters:
in	command_code1 	The first command code for policy extension. Can be NULL. 	
in	command_code2 	The second command code for policy extension. Can be NULL. 	
in,out	current_digest 	The digest list which has to be updated. 	
in	current_hash_alg 	The hash algorithm used for the policy computation.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_calculate_tree (FAPI_CONTEXT *  context, const char *  policyPath, TPMS_POLICY *  policy, TPMI_ALG_HASH  hash_alg, size_t *  digest_idx, size_t *  hash_size)
Compute policy digest for a policy tree.
A policy or a policy path can be passed. If a policy is passed the policy is computed directly from the policy otherwise the policy has to be retrieved from policy store to determine the policy.
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
in	policyPath 	The policy path for policy store. 	
in	policy 	The result of policy deserialization. 	
in	hash_alg 	The used hash alg for policy digest computations. 	
out	digest_idx 	The index of the current digest. The policy digest can be computed for several hash algorithms the digets index is a reverence to the current digest values. 	
out	hash_size 	The size of the current policy digest.	
Return values:
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	If an internal error occurs, which is not covered by other return codes. 	
TSS2_FAPI_RC_BAD_VALUE 	If wrong values are detected during policy calculation. 	
TSS2_FAPI_RC_IO_ERROR 	If an error occurs during access to the policy store. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	If an object needed for policy calculation was not found. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	If policy search for a certain policy digest was not successful. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_RC ifapi_compute_policy_pcr (TPMS_POLICYPCR *  policy, TPML_DIGEST_VALUES *  current_digest, TPMI_ALG_HASH  current_hash_alg)
Calculate a policy digest for a certain PCR selection.
From a PCR list the list of PCR values and the corresponding PCR digest is computed. The passed policy digest will be extended with this data and also with the policy command code.
Parameters:
in	policy 	The policy with the list of selected PCRs. 	
in,out	current_digest 	The digest list which has to be updated. 	
in	current_hash_alg 	The hash algorithm used for the policy computation.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	

Policy callback functions.
Functions
TSS2_RC ifapi_branch_selection (TPML_POLICYBRANCHES *branches, size_t *branch_idx, void *userdata)
TSS2_RC ifapi_exec_auth_nv_policy (TPM2B_NV_PUBLIC *nv_public, TPMI_ALG_HASH hash_alg, void *userdata)
TSS2_RC ifapi_get_duplicate_name (TPM2B_NAME *name, void *userdata)
TSS2_RC ifapi_get_key_public (const char *path, TPMT_PUBLIC *public, void *ctx)
TSS2_RC ifapi_get_nv_public (const char *path, TPM2B_NV_PUBLIC *nv_public, void *ctx)
TSS2_RC ifapi_get_object_name (const char *path, TPM2B_NAME *name, void *ctx)
TSS2_RC ifapi_policy_action (const char *action, void *userdata)
TSS2_RC ifapi_policyeval_cbauth (TPM2B_NAME *name, ESYS_TR *object_handle, ESYS_TR *auth_handle, ESYS_TR *authSession, void *userdata)
TSS2_RC ifapi_read_pcr (TPMS_PCR_SELECT *pcr_select, TPML_PCR_SELECTION *pcr_selection, TPML_PCRVALUES **pcr_values, void *ctx)

Detailed Description
Provides internal callbacks functions for policy execution. 

Function Documentation
TSS2_RC ifapi_branch_selection (TPML_POLICYBRANCHES *  branches, size_t *  branch_idx, void *  userdata)
Callback for branch selection of policy or.
Parameters:
in	branches 	The list of policy branches. 	
out	branch_idx 	The index of the selcted branch. 	
in,out	userdata 	The Fapi context which will be used for keystore access, and storing the policy execution state. the io state. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context is NULL. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if no branch selection callback is defined. This callback will be needed of or policies which have to be executed. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the computed branch index delivered by the callback does not identify a branch. 	
TSS2_RC ifapi_exec_auth_nv_policy (TPM2B_NV_PUBLIC *  nv_public, TPMI_ALG_HASH  hash_alg, void *  userdata)
Callback for executing a policy identified by a digest stored in a nv object.
Parameters:
in	nv_public 	the public data of the nv object which stores the digest of the authorized policy. 	
in	hash_alg 	The hash algorithm used for policy computation. 	
in	userdata 	The user context to retrieve the policy. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_MEMORY 	if it's not possible to allocate enough memory. 	
TSS2_FAPI_RC_BAD_REFERENCE 	If no user data id passed or context stack is not initialized. 	
TSS2_FAPI_RC_IO_ERROR 	If an error occurs during access to the policy store. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	If a policy for a certain path was not found. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	If policy search for a certain policy digest was not successful. 	
TPM2_RC_BAD_AUTH 	If the authentication for an object needed for policy execution fails. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_RC ifapi_get_duplicate_name (TPM2B_NAME *  name, void *  userdata)
Callback for getting the name of a key to be duplicated.
Parameters:
out	name 	the name of the object to be duplicated. 	
in	userdata 	The user context to retrieve the key. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if the context is not passed or the object to be duplicated is not set. 	
TSS2_RC ifapi_get_key_public (const char *  path, TPMT_PUBLIC *  public, void *  ctx)
Get public data of a key from keystore.
Parameters:
in	path 	The relative path of the key. 	
out	public 	The caller allocated public structure. 	
in,out	ctx 	The context to access io and keystore module and to store the io state. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be loaded. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_BAD_TEMPLATE 	If the loaded template is not appropriate for this operation. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_RC ifapi_get_nv_public (const char *  path, TPM2B_NV_PUBLIC *  nv_public, void *  ctx)
Get public data of a NV object from keystore.
Parameters:
in	path 	The relative path of the NV object. 	
out	nv_public 	The caller allocated public structure. 	
in,out	ctx 	The context to access io and keystore module and to store the io state. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be loaded. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_BAD_TEMPLATE 	If the loaded template is not appropriate for this operation. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_RC ifapi_get_object_name (const char *  path, TPM2B_NAME *  name, void *  ctx)
Get TPM name of an object from key keystore.
Parameters:
in	path 	The relative path of the object. 	
out	name 	The caller allocate public structure. 	
in,out	ctx 	The context to access io and keystore module and to store the io state. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_IO_ERROR 	if the data cannot be loaded. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory for internal operations or return parameters. 	
TSS2_FAPI_RC_BAD_TEMPLATE 	If the loaded template is not appropriate for this operation. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_RC ifapi_policy_action (const char *  action, void *  userdata)
Callback for policy action.
Parameters:
in	action 	The name of the policy action. 	
in,out	userdata 	The Fapi context which will be used for keystore access, and storing the policy execution state. the io state. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	If the callback for branch selection is not defined. This callback will be needed of or policies have to be executed. 	
TSS2_FAPI_RC_BAD_REFERENCE 	If no user data is passed. 	
TSS2_RC ifapi_policyeval_cbauth (TPM2B_NAME *  name, ESYS_TR *  object_handle, ESYS_TR *  auth_handle, ESYS_TR *  authSession, void *  userdata)
Callback for authorization of objects used by policy.
Parameters:
in	name 	The name of the object to be authorized. 	
in	object_handle 	The ESYS handle of the used object. 	
in	auth_handle 	will be used for object authorization. For keys it will we equal to the object handle. 	
out	authSession 	The session used for object authorization. 	
in,out	userdata 	The Fapi context which will be used for keystore access, and storing the policy execution state. the io state. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if context or policy is NULL. 	
TSS2_FAPI_RC_MEMORY 	if memory allocation failed. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	If a policy was not found. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	If a key was not found. 	
TSS2_FAPI_RC_IO_ERROR 	If an IO error occurred during reading a policy or a key. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	If an error in an used library occurred. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_RC ifapi_read_pcr (TPMS_PCR_SELECT *  pcr_select, TPML_PCR_SELECTION *  pcr_selection, TPML_PCRVALUES **  pcr_values, void *  ctx)
Read values of PCR registers and clear selection.
Parameters:
in,out	pcr_select 	The registers to be read (bank selection from profile). 	
in,out	pcr_selection 	The registers to be read (with bank selection). 	
out	pcr_values 	The callee-allocated public structure. 	
in,out	ctx 	The context to access io and keystore module and to store the io state. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the input parameters had inappropriate values. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_FAPI_RC_MEMORY 	if memory allocation failed. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	

Policy execution functions.
Functions
TSS2_RC get_policy_digest_idx (TPML_DIGEST_VALUES *digest_values, TPMI_ALG_HASH hashAlg, size_t *idx)
TSS2_RC ifapi_extend_authorization (TPMS_POLICY *policy, TPMS_POLICYAUTHORIZATION *authorization)
TSS2_RC ifapi_policyeval_execute (ESYS_CONTEXT *esys_ctx, IFAPI_POLICY_EXEC_CTX *current_policy)
TSS2_RC ifapi_policyeval_execute_prepare (IFAPI_POLICY_EXEC_CTX *pol_ctx, TPMI_ALG_HASH hash_alg, TPMS_POLICY *policy)

Detailed Description
Provides internal functions for policy execution. 

Function Documentation
TSS2_RC get_policy_digest_idx (TPML_DIGEST_VALUES *  digest_values, TPMI_ALG_HASH  hashAlg, size_t *  idx)
Compute the index for the current digest list and clear the digest.
The list entry with the appropriate hash algorithm will be searched. The found digest will be set to zero.
Parameters:
in,out	digest_values 	The list of policy digests and corresponding hash algorithms. 	
in	hashAlg 	The hash algorithm to be searched. 	
out	idx 	The index of the found digest. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_VALUE 	If no appropriate digest was found in the digest list. 	
TSS2_RC ifapi_extend_authorization (TPMS_POLICY *  policy, TPMS_POLICYAUTHORIZATION *  authorization)
Add a new authorization to a policy.
The the signed hash computed from the policy digest and the policyRef together with the public key of the key used for signing will be stored in the policy.
Parameters:
in,out	policy 	The policy to be authorized. 	
in	authorization 	The structure with the signature, the policyRef and the public key.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_MEMORY 	If the memory for the authorization list cannot be allocated. 	
TSS2_RC ifapi_policyeval_execute (ESYS_CONTEXT *  esys_ctx, IFAPI_POLICY_EXEC_CTX *  current_policy)
Execute all policy commands defined by a list of policy elements.
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_BAD_VALUE 	If wrong values are detected during execution. 	
TSS2_FAPI_RC_IO_ERROR 	If an error occurs during access to the policy store. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	If policy search for a certain policy digest was not successful. 	
TSS2_FAPI_RC_BAD_TEMPLATE 	In a invalid policy is loaded during execution. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_RC ifapi_policyeval_execute_prepare (IFAPI_POLICY_EXEC_CTX *  pol_ctx, TPMI_ALG_HASH  hash_alg, TPMS_POLICY *  policy)
Initialize policy element list to be executed and store policy in context.
Parameters:
in	pol_ctx 	Context for execution of a list of policy elements. 	
in	hash_alg 	The hash algorithm used for the policy computation. 	
in,out	policy 	The policy to be executed. Some policy elements will be used to store computed parameters needed for policy execution. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	If the callback for branch selection is not defined. This callback will be needed of or policies have to be executed. 	
TSS2_FAPI_RC_BAD_VALUE 	If the computed branch index deliverd by the callback does not identify a branch. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	

Policy utilitiy module
Functions
TSS2_RC ifapi_policyutil_execute (FAPI_CONTEXT *context, ESYS_TR *session)
TSS2_RC ifapi_policyutil_execute_prepare (FAPI_CONTEXT *context, TPMI_ALG_HASH hash_alg, TPMS_POLICY *policy)

Detailed Description
Provides functions for the execution of policies for object authorization. 

Function Documentation
TSS2_RC ifapi_policyutil_execute (FAPI_CONTEXT *  context, ESYS_TR *  session)
State machine to Execute the TPM policy commands needed for the current policy.
In the first step a session will be created if no session is passed. In the second step the policy engine will execute the policy.
Parameters:
in,out	context 	The fapi context with the pointer to the policy stack. 	
in,out	session 	The policy session to be extended or if the value is equal zero or ESYS_TR_NONE a new created session will been be stored in this parameter. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_BAD_VALUE 	If wrong values are detected during execution. 	
TSS2_FAPI_RC_IO_ERROR 	If an error occurs during access to the policy store. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	If policy search for a certain policy digest was not successful. 	
TSS2_FAPI_RC_BAD_TEMPLATE 	In a invalid policy is loaded during execution. 	
TPM2_RC_BAD_AUTH 	If the authentication for an object needed for policy execution fails. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_RC ifapi_policyutil_execute_prepare (FAPI_CONTEXT *  context, TPMI_ALG_HASH  hash_alg, TPMS_POLICY *  policy)
Prepare the execution of a new policy on policy stack.
The context for the policy utility, the policy execution and the needed callbacks is initialized. The policy execution will be prepared. In this step the list of policies to be executed will be computed. 
Parameters:
in,out	context 	The fapi context with the pointer to the policy stack. 	
in	hash_alg 	The hash algorithm used for the policy computation. 	
in,out	policy 	The policy to be executed. Some policy elements will be used to store computed parameters needed for policy execution. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	If the callback for branch selection is not defined. This callback will be needed of or policies have to be executed. 	
TSS2_FAPI_RC_BAD_VALUE 	If the computed branch index deliverd by the callback does not identify a branch. 	
TSS2_FAPI_RC_BAD_REFERENCE 	If no context is passed.	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	

Helper functions module
Functions
bool add_string_to_list (NODE_STR_T *str_list, char *string)
TSS2_RC append_object_to_list (void *object, NODE_OBJECT_T **object_list)
void free_string_list (NODE_STR_T *node)
char * get_description (IFAPI_OBJECT *object)
bool ifapi_TPM2B_DIGEST_cmp (TPM2B_DIGEST *in1, TPM2B_DIGEST *in2)
bool ifapi_TPM2B_ECC_PARAMETER_cmp (TPM2B_ECC_PARAMETER *in1, TPM2B_ECC_PARAMETER *in2)
bool ifapi_TPM2B_PUBLIC_KEY_RSA_cmp (TPM2B_PUBLIC_KEY_RSA *in1, TPM2B_PUBLIC_KEY_RSA *in2)
bool ifapi_TPMS_ECC_POINT_cmp (TPMS_ECC_POINT *in1, TPMS_ECC_POINT *in2)
bool ifapi_TPMT_PUBLIC_cmp (TPMT_PUBLIC *in1, TPMT_PUBLIC *in2)
bool ifapi_TPMU_PUBLIC_ID_cmp (TPMU_PUBLIC_ID *in1, UINT32 selector1, TPMU_PUBLIC_ID *in2, UINT32 selector2)
TSS2_RC ifapi_asprintf (char **str, const char *fmt,...)
TSS2_RC ifapi_calculate_pcr_digest (json_object *jso_event_list, const FAPI_QUOTE_INFO *quote_info, TPM2B_DIGEST *pcr_digest)
TSS2_RC ifapi_check_profile_pcr_selection (const TPML_PCR_SELECTION *pcr_profile, const TPML_PCR_SELECTION *pcr_capablity)
void ifapi_cleanup_policy (TPMS_POLICY *policy)
bool ifapi_cmp_public_key (TPM2B_PUBLIC *key1, TPM2B_PUBLIC *key2)
TSS2_RC ifapi_compute_policy_digest (TPML_PCRVALUES *pcrs, TPML_PCR_SELECTION *pcr_selection, TPMI_ALG_HASH hash_alg, TPM2B_DIGEST *pcr_digest)
TSS2_RC ifapi_compute_quote_info (IFAPI_OBJECT *sig_key_object, TPM2B_ATTEST *tpm_quoted, char **quoteInfo)
TPMS_POLICY * ifapi_copy_policy (const TPMS_POLICY *from_policy)
TSS2_RC ifapi_create_dirs (const char *supdir, const char *path)
TSS2_RC ifapi_extend_vpcr (TPM2B_DIGEST *vpcr, TPMI_ALG_HASH bank, const IFAPI_EVENT *event)
TSS2_RC ifapi_filter_pcr_selection_by_index (TPML_PCR_SELECTION *pcr_selection, const TPM2_HANDLE *pcr_index, size_t pcr_count)
void ifapi_free_node_list (NODE_OBJECT_T *node)
void ifapi_free_object_list (NODE_OBJECT_T *node)
int ifapi_get_curl_buffer (unsigned char *url, unsigned char **buffer, size_t *buffer_size)
ESYS_TR ifapi_get_hierary_handle (const char *path)
TSS2_RC ifapi_get_name (TPMT_PUBLIC *publicInfo, TPM2B_NAME *name)
TSS2_RC ifapi_get_nv_start_index (const char *path, TPM2_HANDLE *start_nv_index)
TSS2_RC ifapi_get_quote_info (char const *quoteInfo, TPM2B_ATTEST *tpm_quoted, FAPI_QUOTE_INFO *fapi_quote_info)
bool ifapi_hierarchy_path_p (const char *path)
void ifapi_init_hierarchy_object (IFAPI_OBJECT *hierarchy, ESYS_TR esys_handle)
TSS2_RC ifapi_nv_get_name (TPM2B_NV_PUBLIC *publicInfo, TPM2B_NAME *name)
TSS2_RC ifapi_object_cmp_name (IFAPI_OBJECT *object, void *name, bool *equal)
TSS2_RC ifapi_object_cmp_nv_public (IFAPI_OBJECT *object, void *nv_public, bool *equal)
size_t ifapi_path_length (NODE_STR_T *node)
TSS2_RC ifapi_path_string (char **dest, const char *supdir, NODE_STR_T *node, char *name)
TSS2_RC ifapi_path_string_n (char **dest, const char *supdir, NODE_STR_T *node, char *name, size_t n)
bool ifapi_path_type_p (const char *path, const char *type)
TSS2_RC ifapi_set_key_flags (const char *type, bool policy, IFAPI_KEY_TEMPLATE *template)
TSS2_RC ifapi_set_nv_flags (const char *type, IFAPI_NV_TEMPLATE *template, const char *policy)
TSS2_RC ifapi_tpm_to_fapi_signature (IFAPI_OBJECT *sig_key_object, TPMT_SIGNATURE *tpm_signature, uint8_t **signature, size_t *signatureSize)
NODE_STR_T * init_string_list (const char *string)
bool object_with_auth (IFAPI_OBJECT *object)
TSS2_RC push_object_to_list (void *object, NODE_OBJECT_T **object_list)
NODE_STR_T * split_string (const char *string, char *delimiter)
int vasprintf (char **str, const char *fmt, va_list args)
TSS2_RC ifapi_check_nv_index (const char *path, TPM2_HANDLE nv_index)
bool ifapi_null_primary_p (const char *path)

Detailed Description
Provides helper functions. 

Function Documentation
bool add_string_to_list (NODE_STR_T *  str_list, char *  string)
Add string to the last element of a linked list of strings.
A duplicate of the passed string will be added.
Parameters:
in,out	str_list 	The linked list. 	
in	string 	The string to be added.	
Return values:
true 	if the string was added to the list. 	
false 	if the list could not be extended. 	
TSS2_RC append_object_to_list (void *  object, NODE_OBJECT_T **  object_list)
Add a object as last element to a linked list.
Parameters:
in	object 	The object to be added. 	
in,out	object_list 	The linked list to be extended.	
Return values:
TSS2_RC_SUCCESS 	if the object was added. 	
TSS2_FAPI_RC_MEMORY 	If memory for the list extension cannot be allocated. 	
void free_string_list (NODE_STR_T *  node)
Free linked list of strings.
Parameters:
in	node 	the first node of the linked list. 	
TSS2_RC ifapi_asprintf (char **  str, const char *  fmt,   ...)
Print to allocated string.
A list of parameters will be printed to an allocated string according to the format description in the first parameter.
Parameters:
out	str 	The allocated output string. 	
in	fmt 	The format string (printf formats can be used.) 	
in	... 	The list of objects to be printed.	
Return values:
TSS2_RC_SUCCESS 	If the printing was successful. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_calculate_pcr_digest (json_object *  jso_event_list, const FAPI_QUOTE_INFO *  quote_info, TPM2B_DIGEST *  pcr_digest)
Check whether a event list corresponds to a certain quote information.
The event list is used to compute the PCR values corresponding to this event list. The PCR digest for these PCRs is computed and compared with the attest passed with quote_info.
Parameters:
in	jso_event_list 	The event list in JSON representation. 	
in	quote_info 	The information structure with the attest. 	
out	pcr_digest 	The computed pcr_digest for the PCRs uses by FAPI.	
Return values:
TSS2_RC_SUCCESS 	If the PCR digest from the event list matches the PCR digest passed with the quote_info. 	
TSS2_FAPI_RC_SIGNATURE_VERIFICATION_FAILED 	If the digest computed from event list does not match the attest 	
TSS2_FAPI_RC_BAD_VALUE 	If inappropriate values are detected in the input data. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
ifapi_check_nv_index (const char *  path, TPM2_HANDLE  nv_index)
Check whether NV index is appropriate for NV path.
The value will be checked based on e TCG handle registry.
Parameters:
in	path 	The path used for the NV object. 	
out	nv_index 	The NV index to be used.	
Return values:
TSS2_RC_SUCCESS 	If the index for the path can be determined. 	
TSS2_FAPI_RC_BAD_PATH 	If the path is not valid. 	
TSS2_FAPI_RC_BAD_VALUE 	If the nv index is not appropriate for the path. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_check_profile_pcr_selection (const TPML_PCR_SELECTION *  pcr_profile, const TPML_PCR_SELECTION *  pcr_capablity)
Check whether profile PCR capabilities are a subset of TPM PCR capabilities.
It has to be checked that every hash alg from the profile is available and whether the selected PCRs are available. 
Parameters:
in	pcr_profile 	The pcr profile to use as basis for the selection. 	
in	pcr_capablity 	The PCR capabilities available for TPM. 	
Return values:
TSS2_RC_SUCCESSS 	if the conversion was successful. 	
TSS2_FAPI_RC_BAD_VALUE 	if profile is not subset of capabilities. 	
void ifapi_cleanup_policy (TPMS_POLICY *  policy)
Free memory allocated during deserialization of policy.
The object will not be freed (might be declared on the stack).
Parameters:
in	policy 	The policy to be cleaned up. 	
bool ifapi_cmp_public_key (TPM2B_PUBLIC *  key1, TPM2B_PUBLIC *  key2)
Compare two public keys.
Parameters:
in	key1 	The first key. 	
in	key2 	The second key. 	
Return values:
true 	if equal false if not. 	
TSS2_RC ifapi_compute_policy_digest (TPML_PCRVALUES *  pcrs, TPML_PCR_SELECTION *  pcr_selection, TPMI_ALG_HASH  hash_alg, TPM2B_DIGEST *  pcr_digest)
Compute PCR selection and a PCR digest for a PCR value list.
Parameters:
in	pcrs 	The list of PCR values. 	
out	pcr_selection 	The selection computed based on the list of PCR values. 	
in	hash_alg 	The hash algorithm which is used for the policy computation. 	
out	pcr_digest 	The computed PCR digest corresponding to the passed PCR value list.	
Return values:
TSS2_RC_SUCCESS 	if the PCR selection and the PCR digest could be computed.. 	
TSS2_FAPI_RC_BAD_VALUE 	If inappropriate values are detected in the input data. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_RC ifapi_compute_quote_info (IFAPI_OBJECT *  sig_key_object, TPM2B_ATTEST *  tpm_quoted, char **  quoteInfo)
Compute the JSON representation of quote information.
The attest generated by a TPM quote will be converted into a JSON representation together with the signature scheme of the key used for the quote.
Parameters:
in	sig_key_object 	The key object which was used for the quote. 	
in	tpm_quoted 	The attest produced by the quote. 	
out	quoteInfo 	The character string with the JSON representation of the attest together with the signing schemed.	
Return values:
TSS2_RC_SUCCESS 	If the conversion was successful. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_BAD_VALUE 	If an invalid value is detected during serialisation. 	
Possible 	error codes of the unmarshaling function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TPMS_POLICY * ifapi_copy_policy (const TPMS_POLICY *  from_policy)
Copy policy.
Parameters:
in	from_policy 	the policy to be copied. 	
Return values:
The 	new policy or NULL if not enough memory was available. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_create_dirs (const char *  supdir, const char *  path)
Create sub-directories in a certain directory.
Parameters:
in	supdir 	The directory in which the new directories shall be created. 	
in	path 	The path containing one or more sub-directories.	
Return values:
TSS2_RC_SUCCESS 	If the directories were created. 	
TSS2_FAPI_RC_MEMORY 	If the linked list with the sub-directories cannot be allocated. 	
TSS2_FAPI_RC_BAD_VALUE 	If a directory cannot be created. 	
TSS2_RC ifapi_extend_vpcr (TPM2B_DIGEST *  vpcr, TPMI_ALG_HASH  bank, const IFAPI_EVENT *  event)
Compute new PCR value from a part of an event list.
Parameters:
in,out	vpcr 	The old and the new PCR value. 	
in	bank 	The bank corresponding to value of the event list which will be used for computation. 	
in	event 	The event list with the values which were extended for a certain bank. 	
Return values:
TSS2_FAPI_RC_BAD_VALUE 	if the bank was not found in the event list. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an error occurs in the crypto library 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_filter_pcr_selection_by_index (TPML_PCR_SELECTION *  pcr_selection, const TPM2_HANDLE *  pcr_index, size_t  pcr_count)
Reduce a PCR selection to a single pcr.
This includes two steps: clearing all bits but the selected and clearing empty hashalg lines.
Parameters:
in,out	pcr_selection 	The pcr selection to be filtered. 	
in	pcr_index 	The only PCR to remain selected. 	
in	pcr_count 	The size of the pcr list.	
Return values:
TSS2_RC_SUCCESS 	if the filtering was successful. 	
TSS2_FAPI_RC_BAD_VALUE 	if no pcr remain selected or the pcr selection is malformed. 	
void ifapi_free_node_list (NODE_OBJECT_T *  node)
Free linked list of IFAPI objects (link nodes only).
Parameters:
in	node 	the first node of the linked list. 	
void ifapi_free_object_list (NODE_OBJECT_T *  node)
Free linked list of IFAPI objects.
Parameters:
in	node 	the first node of the linked list. 	
int ifapi_get_curl_buffer (unsigned char *  url, unsigned char **  buffer, size_t *  buffer_size)
Get byte buffer from file system or web via curl.
Parameters:
in	url 	The url of the resource. 	
out	buffer 	The buffer retrieved via the url. 	
out	buffer_size 	The size of the retrieved object.	
Return values:
0 	if buffer could be retrieved. 	
-1 	if an error did occur 	
ESYS_TR ifapi_get_hierary_handle (const char *  path)
Get ESYS handle for a hierarchy path.
Parameters:
in	path 	The path to be checked.	
Return values:
The 	ESAPI handle for the hierarchy defined in path. 	
0 	if not handle can be assigned. 	
TSS2_RC ifapi_get_name (TPMT_PUBLIC *  publicInfo, TPM2B_NAME *  name)
Compute the name of a TPM transient or persistent object.
Parameters:
in	publicInfo 	The public information of the TPM object. 	
out	name 	The computed name. 	
Return values:
TPM2_RC_SUCCESS 	or one of the possible errors TSS2_FAPI_RC_BAD_VALUE, TSS2_FAPI_RC_MEMORY, TSS2_FAPI_RC_GENERAL_FAILURE. or return codes of SAPI errors. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_RC ifapi_get_nv_start_index (const char *  path, TPM2_HANDLE *  start_nv_index)
Determine start index for NV object depending on type.
The value will be determined based on e TCG handle registry.
Parameters:
in	path 	The path used for the NV object. 	
out	start_nv_index 	The first possible NV index for this type.	
Return values:
TSS2_RC_SUCCESS 	If the index for the path can be determined. 	
TSS2_FAPI_RC_BAD_PATH 	If no handle can be assigned. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_get_quote_info (char const *  quoteInfo, TPM2B_ATTEST *  tpm_quoted, FAPI_QUOTE_INFO *  fapi_quote_info)
Deserialize the JSON representation of FAPI quote information.
The JSON representation of FAPI quote information will be deserialized to a FAPI_QUOTE_INFO structure and also the TPM2B version of the attest will be created.
Parameters:
in	quoteInfo 	The JSON representation if the quote information. 	
out	tpm_quoted 	The marhaled version of the attest structure. 	
out	fapi_quote_info 	The quote information structure used by FAPI.	
Return values:
TSS2_RC_SUCCESS 	If the deserialization was successful. 	
TSS2_FAPI_RC_BAD_VALUE 	If an invalid value is detected during deserialisation. 	
Possible 	error codes of the marshaling function. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
bool ifapi_hierarchy_path_p (const char *  path)
Determine whether path describes a hierarchy object.
It will be checked whether the path describes a hierarch. A key path with a hierarchy will not deliver true.
Parameters:
in	path 	The path to be checked.	
Return values:
true 	if the path describes a hierarchy. 	
false 	if not. 	
void ifapi_init_hierarchy_object (IFAPI_OBJECT *  hierarchy, ESYS_TR  esys_handle)
Initialize the internal representation of a FAPI hierarchy object.
The object will be cleared and the type of the general fapi object will be set to hierarchy.
Parameters:
in,out	hierarchy 	The caller allocated hierarchy object. The name of the object will be computed. 	
in	esys_handle 	The ESAPI handle of the hierarchy which will be added to to the object. 	
ifapi_null_primary_p (const char *  path)
Determine whether path is a primary in the null hierarchy.
Parameters:
in	path 	The path to be checked.	
Return values:
true 	if the path describes a null hierarchy primary. 	
false 	if not. 	
TSS2_RC ifapi_nv_get_name (TPM2B_NV_PUBLIC *  publicInfo, TPM2B_NAME *  name)
Compute the name from the public data of a NV index.
The name of a NV index is computed as follows: name = nameAlg||Hash(nameAlg,marshal(publicArea)) 
Parameters:
in	publicInfo 	The public information of the NV index. 	
out	name 	The computed name. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_MEMORY 	Memory can not be allocated. 	
TSS2_FAPI_RC_BAD_VALUE 	for invalid parameters. 	
TSS2_FAPI_RC_BAD_REFERENCE 	for unexpected NULL pointer parameters. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	for errors of the crypto library. 	
TSS2_SYS_RC_* 	for SAPI errors. 	
TSS2_RC ifapi_object_cmp_name (IFAPI_OBJECT *  object, void *  name, bool *  equal)
Check whether a nv or key object has a certain name.
Parameters:
in	object 	The object (has to be checked whether it's a key). 	
in	name 	The name to be compared. 	
out	equal 	If the two names are equal. 	
Return values:
TSS2_RC_SUCCESSS 	if name of object can be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_RC ifapi_object_cmp_nv_public (IFAPI_OBJECT *  object, void *  nv_public, bool *  equal)
Check whether a nv object has a certain public info.
Parameters:
in	object 	The object (has to be checked whether it's a key). 	
in	nv_public 	The NV public data with the NV index. 	
out	equal 	If the two names are equal. 	
Return values:
TSS2_RC_SUCCESSS 	if name of object can be deserialized. 	
size_t ifapi_path_length (NODE_STR_T *  node)
Compute the number on nodes in a linked list.
Parameters:
in	node 	the first node of the linked list.	
Return values:
the 	number on nodes. 	
TSS2_RC ifapi_path_string (char **  dest, const char *  supdir, NODE_STR_T *  node, char *  name)
Compute a pathname based on a linked list of strings.
Parameters:
out	dest 	The pointer to the generated pathname (callee allocated). 	
in	supdir 	A sup directory will be the prefix of the pathname. 	
in	node 	The linked list. 	
in	name 	A name which is appended to the result if not NULL.	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the memory for the pathname can't be allocated. 	
TSS2_RC ifapi_path_string_n (char **  dest, const char *  supdir, NODE_STR_T *  node, char *  name, size_t  n)
Compute a pathname based on the first n elements of a linked list of strings.
Parameters:
out	dest 	the pointer to the pathname (callee allocated). 	
in	supdir 	a sup directory will be the prefix of the pathname. (can be NULL). 	
in	node 	the linked list. 	
in	name 	the filename (can be NULL). 	
in	n 	the number of the first elements which will bes used for concatenation. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the memory for the pathname can't be allocated. 	
bool ifapi_path_type_p (const char *  path, const char *  type)
Determine whether path is of certain type.
Parameters:
in	path 	The path to be checked. 	
in	type 	sub-string at the beginning of the path to be checked.	
Return values:
true 	if the path name starts with type. 	
false 	if not. 	
TSS2_RC ifapi_set_key_flags (const char *  type, bool  policy, IFAPI_KEY_TEMPLATE *  template)
Create template for key creation based on type flags.
Based on passed flags the TPM2B_PUBLIC data which is used for key creation will be adapted.
Parameters:
in	type 	The flags describing the key type. 	
in	policy 	The flag whether a policy is used. 	
out	template 	The template including the TPM2B_PUBLIC which will be used for key creation. 	
Return values:
TSS2_RC_SUCCESS 	if the template can be generated. 	
TSS2_FAPI_RC_BAD_VALUE 	If an invalid combination of flags was used. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_set_nv_flags (const char *  type, IFAPI_NV_TEMPLATE *  template, const char *  policy)
Create template for nv object creation based on type flags.
Based on passed flags the TPM2B_NV_PUBLIC data which is used for key creation will be adapted. 
Parameters:
in	type 	The flags describing the nv object type. 	
in	policy 	The flag whether a policy is used. 	
out	template 	The template including the TPM2B_NV_PUBLIC which will be used for nv object creation. 	
Return values:
TSS2_RC_SUCCESS 	if the template can be generated. 	
TSS2_FAPI_RC_BAD_VALUE 	If an invalid combination of flags was used. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
bool ifapi_TPM2B_DIGEST_cmp (TPM2B_DIGEST *  in1, TPM2B_DIGEST *  in2)
Compare two variables of type TPM2B_DIGEST.
Parameters:
in	in1 	variable to be compared with in2. 	
in	in2 	variable to be compared with in1.	
Return values:
true 	if the variables are equal. 	
false 	if not. 	
bool ifapi_TPM2B_ECC_PARAMETER_cmp (TPM2B_ECC_PARAMETER *  in1, TPM2B_ECC_PARAMETER *  in2)
Compare two variables of type TPM2B_ECC_PARAMETER.
Parameters:
in	in1 	variable to be compared with in2. 	
in	in2 	variable to be compared with in1.	
Return values:
true 	if the variables are equal. 	
false 	if not. 	
bool ifapi_TPM2B_PUBLIC_KEY_RSA_cmp (TPM2B_PUBLIC_KEY_RSA *  in1, TPM2B_PUBLIC_KEY_RSA *  in2)
Compare two variables of type TPM2B_PUBLIC_KEY_RSA.
Parameters:
in	in1 	variable to be compared with in2 	
in	in2 	variable to be compared with in1	
Return values:
true 	if the variables are equal. 	
false 	if not. 	
TSS2_RC ifapi_tpm_to_fapi_signature (IFAPI_OBJECT *  sig_key_object, TPMT_SIGNATURE *  tpm_signature, uint8_t **  signature, size_t *  signatureSize)
Compute signature as byte array and signature size in DER format.
For ECC signatures the conversion to DER is necessary, for RSA the buffer of the TPM2B has already DER format. parameters. 
Parameters:
in	sig_key_object 	The signing key. 	
in	tpm_signature 	the signature in TPM format. 	
out	signature 	The byte array of the signature (callee allocated). 	
out	signatureSize 	The size of the byte array.	
Return values:
TSS2_RC_SUCCESSS 	if the conversion was successful. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	If an internal error occurs, which is not covered by other return codes (e.g. a unexpected openssl error). 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
bool ifapi_TPMS_ECC_POINT_cmp (TPMS_ECC_POINT *  in1, TPMS_ECC_POINT *  in2)
Compare two variables of type TPMS_ECC_POINT.
Parameters:
in	in1 	variable to be compared with in2. 	
in	in2 	variable to be compared with in1.	
Return values:
true 	if the variables are equal. 	
false 	if not. 	
bool ifapi_TPMT_PUBLIC_cmp (TPMT_PUBLIC *  in1, TPMT_PUBLIC *  in2)
Compare the PUBLIC_ID stored in two TPMT_PUBLIC structures. 
Parameters:
in	in1 	the public data with the unique data to be compared with: 	
in	in2 		
Return values:
true 	if the variables are equal. 	
false 	if not. 	
bool ifapi_TPMU_PUBLIC_ID_cmp (TPMU_PUBLIC_ID *  in1, UINT32  selector1, TPMU_PUBLIC_ID *  in2, UINT32  selector2)
Compare two variables of type TPMU_PUBLIC_ID.
Parameters:
in	in1 	variable to be compared with in2. 	
in	selector1 	key type of first key. 	
in	in2 	variable to be compared with in1. 	
in	selector2 	key type of second key.	
Returns:
true if variables are equal. 
false if not. 
NODE_STR_T * init_string_list (const char *  string)
Initialize a linked list of strings.
free string in the list object will be set to true. If the list will be extended by sub-string which are part of this strin free_string has to be set to false.
Parameters:
in	string 	The string for the first element.	
Return values:
the 	initial node of the linked list. 	
NULL 	if the list cannot be created. 	
bool object_with_auth (IFAPI_OBJECT *  object)
Determine whether authentication with an auth value is needed ro an object..
In the key store the information whether an auth value was provided for an object is saved. Thus the it is possible to decide whether the auth value callback is required for authentication.
Parameters:
in	object 	The object which has to be checked..	
Return values:
true 	If an auth value was provided. 	
false 	If not. 	
TSS2_RC push_object_to_list (void *  object, NODE_OBJECT_T **  object_list)
Add a object as first element to a linked list.
Parameters:
in	object 	The object to be added. 	
in,out	object_list 	The linked list to be extended.	
Return values:
TSS2_RC_SUCCESS 	if the object was added. 	
TSS2_FAPI_RC_MEMORY 	If memory for the list extension cannot be allocated. 	
NODE_STR_T * split_string (const char *  string, char *  delimiter)
Divides str into substrings based on a delimiter.
Parameters:
in	string 	the string to split. 	
in	delimiter 	the delimiter.	
Return values:
The 	linked list of substrings. 	
NULL 	if the list cannot be created. 	
int vasprintf (char **  str, const char *  fmt, va_list  args)
Print to allocated string.
A list of parameters will be printed to an allocated string according to the format description in the first parameter.
Parameters:
out	str 	The allocated output string. 	
in	fmt 	The format string (printf formats can be used.) 	
in	args 	The list of objects to be printed.	
Return values:
int 	The size of the string ff the printing was successful. 	
-1 	if not enough memory can be allocated. 	

Utility module
Functions
void full_path_to_fapi_path (IFAPI_KEYSTORE *keystore, char *path)
TSS2_RC ifapi_authorize_object (FAPI_CONTEXT *context, IFAPI_OBJECT *object, ESYS_TR *session)
TPM2_RC ifapi_capability_get (FAPI_CONTEXT *context, TPM2_CAP capability, UINT32 count, TPMS_CAPABILITY_DATA **capability_data)
TPM2_RC ifapi_capability_init (FAPI_CONTEXT *context)
TSS2_RC ifapi_change_auth_hierarchy (FAPI_CONTEXT *context, ESYS_TR handle, IFAPI_OBJECT *hierarchy_object, TPM2B_AUTH *newAuthValue)
TSS2_RC ifapi_change_policy_hierarchy (FAPI_CONTEXT *context, ESYS_TR handle, IFAPI_OBJECT *hierarchy_object, TPMS_POLICY *policy)
TSS2_RC ifapi_cleanup_session (FAPI_CONTEXT *context)
TSS2_RC ifapi_esys_serialize_object (ESYS_CONTEXT *ectx, IFAPI_OBJECT *object)
TSS2_RC ifapi_flush_object (FAPI_CONTEXT *context, ESYS_TR handle)
void ifapi_flush_policy_session (FAPI_CONTEXT *context, ESYS_TR session, TSS2_RC r)
void ifapi_free_object (FAPI_CONTEXT *context, IFAPI_OBJECT **object)
void ifapi_free_objects (FAPI_CONTEXT *context)
TSS2_RC ifapi_get_certificates (FAPI_CONTEXT *context, UINT32 min_handle, UINT32 max_handle, NODE_OBJECT_T **cert_list)
TSS2_RC ifapi_get_description (IFAPI_OBJECT *object, char **description)
TSS2_RC ifapi_get_free_handle_async (FAPI_CONTEXT *fctx, TPM2_HANDLE *handle)
TSS2_RC ifapi_get_free_handle_finish (FAPI_CONTEXT *fctx, TPM2_HANDLE *handle, TPM2_HANDLE max)
TSS2_RC ifapi_get_json (FAPI_CONTEXT *context, IFAPI_OBJECT *object, char **json_string)
TSS2_RC ifapi_get_random (FAPI_CONTEXT *context, size_t numBytes, uint8_t **data)
TSS2_RC ifapi_get_session_async (ESYS_CONTEXT *esys, ESYS_TR saltkey, const IFAPI_PROFILE *profile, TPMI_ALG_HASH hashAlg)
TSS2_RC ifapi_get_session_finish (ESYS_CONTEXT *esys, ESYS_TR *session, TPMA_SESSION flags)
TSS2_RC ifapi_get_sessions_async (FAPI_CONTEXT *context, IFAPI_SESSION_TYPE session_flags, TPMA_SESSION attribute_flags1, TPMA_SESSION attribute_flags2)
TSS2_RC ifapi_get_sessions_finish (FAPI_CONTEXT *context, const IFAPI_PROFILE *profile, TPMI_ALG_HASH hash_alg)
TSS2_RC ifapi_get_sig_scheme (FAPI_CONTEXT *context, IFAPI_OBJECT *object, char const *padding, TPM2B_DIGEST *digest, TPMT_SIG_SCHEME *sig_scheme)
TSS2_RC ifapi_init_primary_async (FAPI_CONTEXT *context, TSS2_KEY_TYPE ktype)
TSS2_RC ifapi_initialize_object (ESYS_CONTEXT *ectx, IFAPI_OBJECT *object)
TSS2_RC ifapi_key_create (FAPI_CONTEXT *context, IFAPI_KEY_TEMPLATE *template)
TSS2_RC ifapi_key_create_prepare (FAPI_CONTEXT *context, char const *keyPath, char const *policyPath)
TSS2_RC ifapi_key_create_prepare_auth (FAPI_CONTEXT *context, char const *keyPath, char const *policyPath, char const *authValue)
TSS2_RC ifapi_key_create_prepare_sensitive (FAPI_CONTEXT *context, char const *keyPath, char const *policyPath, size_t dataSize, char const *authValue, uint8_t const *data)
TSS2_RC ifapi_key_sign (FAPI_CONTEXT *context, IFAPI_OBJECT *sig_key_object, char const *padding, TPM2B_DIGEST *digest, TPMT_SIGNATURE **tpm_signature, char **publicKey, char **certificate)
TSS2_RC ifapi_load_key (FAPI_CONTEXT *context, char const *keyPath, IFAPI_OBJECT **key_object)
TSS2_RC ifapi_load_key_async (FAPI_CONTEXT *context, size_t position)
TSS2_RC ifapi_load_key_finish (FAPI_CONTEXT *context, bool flush_parent)
TSS2_RC ifapi_load_keys_async (FAPI_CONTEXT *context, char const *keyPath)
TSS2_RC ifapi_load_keys_finish (FAPI_CONTEXT *context, bool flush_parent, ESYS_TR *handle, IFAPI_OBJECT **key_object)
TSS2_RC ifapi_load_primary_async (FAPI_CONTEXT *context, char *path)
TSS2_RC ifapi_load_primary_finish (FAPI_CONTEXT *context, ESYS_TR *handle)
TSS2_RC ifapi_merge_profile_into_nv_template (FAPI_CONTEXT *context, IFAPI_NV_TEMPLATE *template)
TSS2_RC ifapi_merge_profile_into_template (const IFAPI_PROFILE *profile, IFAPI_KEY_TEMPLATE *template)
TSS2_RC ifapi_non_tpm_mode_init (FAPI_CONTEXT *context)
TSS2_RC ifapi_nv_read (FAPI_CONTEXT *context, uint8_t **data, size_t *size)
TSS2_RC ifapi_nv_write (FAPI_CONTEXT *context, char *nvPath, size_t param_offset, uint8_t const *data, size_t size)
void ifapi_primary_clean (FAPI_CONTEXT *context)
void ifapi_session_clean (FAPI_CONTEXT *context)
TSS2_RC ifapi_session_init (FAPI_CONTEXT *context)
TSS2_RC ifapi_set_auth (FAPI_CONTEXT *context, IFAPI_OBJECT *auth_object, const char *description)
void ifapi_set_description (IFAPI_OBJECT *object, char *description)
IFAPI_OBJECT * ifapi_allocate_object (FAPI_CONTEXT *context)
TSS2_RC ifapi_create_primary (FAPI_CONTEXT *context, IFAPI_KEY_TEMPLATE *template)
TSS2_RC ifapi_get_key_properties (FAPI_CONTEXT *context, char const *key_path, bool *is_primary, bool *in_null_hierarchy)
const char * ifapi_get_object_path (IFAPI_OBJECT *object)
TSS2_RC ifapi_load_parent_keys_async (FAPI_CONTEXT *context, char const *keyPath)

Detailed Description
Provides internal utility functions. 

Function Documentation
void full_path_to_fapi_path (IFAPI_KEYSTORE *  keystore, char *  path)
Convert full FAPI path to relative path.
The relative path will be copied directly into the passed object.
Parameters:
in	keystore 	The key directories and default profile. 	
in,out	path 	The absolute path. 	
ifapi_allocate_object (FAPI_CONTEXT *  context)
Allocate ifapi object and store the result in a linked list.
Allocated ifapi objects will be recorded in the context.
Parameters:
in,out	context 	The FAPI_CONTEXT.	
Return values:
The 	allocated ifapi object. 	
NULL 	if the object cannot be allocated. 	
TSS2_RC ifapi_authorize_object (FAPI_CONTEXT *  context, IFAPI_OBJECT *  object, ESYS_TR *  session)
State machine to authorize a key, a NV object of a hierarchy.
Parameters:
in,out	context 	for storing all state information. 	
in	object 	The FAPI object. 	
out	session 	The session which can be used for object authorization.	
Return values:
TSS2_RC_SUCCESS 	If the authorization is successful 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_BAD_VALUE 	If wrong values are detected during execution. 	
TSS2_FAPI_RC_IO_ERROR 	If an error occurs during access to the policy store. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	If a policy for a certain path was not found. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	If policy search for a certain policy digest was not successful. 	
TPM2_RC_BAD_AUTH 	If the authentication for an object needed for the policy execution fails. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a needed authorization callback is not defined. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TPM2_RC ifapi_capability_get (FAPI_CONTEXT *  context, TPM2_CAP  capability, UINT32  count, TPMS_CAPABILITY_DATA **  capability_data)
State machine for receiving TPM capability information.
The state machine shares the state with the FAPI function Fapi_GetInfo. context->state == GET_INFO_GET_CAP_MORE signals that more capability data can be retrieved.
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
in	capability 	The capability to be retrieved. 	
in	count 	The maximal number of items that should be retrieved. 	
out	capability_data 	The retrieved capability information.	
Return values:
TSS2_RC_SUCCESS 	If all capability data is retrieved. 	
TSS2_FAPI_RC_TRY_AGAIN 	if more capability data is available. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TPM2_RC ifapi_capability_init (FAPI_CONTEXT *  context)
Prepare the receiving of capability data.
Parameters:
in,out	context 	The FAPI_CONTEXT.	
Return values:
TSS2_RC_SUCCESS. 		
TSS2_RC ifapi_change_auth_hierarchy (FAPI_CONTEXT *  context, ESYS_TR  handle, IFAPI_OBJECT *  hierarchy_object, TPM2B_AUTH *  newAuthValue)
State machine for changing the hierarchy authorization.
First it will be tried to set the auth value of the hierarchy with a "null" authorization. If this trial is not successful it will be tried to authorize the hierarchy via a callback. If an not null auth value is passed with_auth is set to yes for the object otherwise to no. So for later authorizations it will be clear whether null authorization is possible or not.
Parameters:
in	context 	The FAPI_CONTEXT. 	
in	handle 	The ESAPI handle of the hierarchy. 	
in,out	hierarchy_object 	The internal FAPI representation of a hierarchy. 	
in	newAuthValue 	The new authorization for the hierarchy.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occured. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_IO_ERROR 	if an error occured while accessing the object store. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_RC ifapi_change_policy_hierarchy (FAPI_CONTEXT *  context, ESYS_TR  handle, IFAPI_OBJECT *  hierarchy_object, TPMS_POLICY *  policy)
State machine for changing the policy of a hierarchy.
Based on a passed policy the policy digest will be computed. First it will be tried to set the policy of the hierarchy with a "null" authorization. If this trial is not successful it will be tried to authorize the hierarchy via a callback. If an not null auth value is passed with_auth is set to yes for the object otherwise to no. So for later authorizations it will be clear whether null authorization is possible or not.
Parameters:
in	context 	The FAPI_CONTEXT. 	
in	handle 	The ESAPI handle of the hierarchy. 	
in,out	hierarchy_object 	The internal FAPI representation of a hierarchy. 	
in	policy 	The new policy assigned to the hierarchy.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	If an internal error occurs, which is not covered by other return codes. 	
TSS2_FAPI_RC_BAD_VALUE 	If wrong values are detected during policy calculation. 	
TSS2_FAPI_RC_IO_ERROR 	If an error occurs during access to the policy store. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	If an object needed for policy calculation was not found. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	If policy search for a certain policy digest was not successful. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
< no path needed 
TSS2_RC ifapi_cleanup_session (FAPI_CONTEXT *  context)
State machine for asynchronous cleanup of a FAPI session.
Used sessions and the SRK will be flushed.
Parameters:
in	context 	The FAPI_CONTEXT storing the used handles.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
ifapi_create_primary (FAPI_CONTEXT *  context, IFAPI_KEY_TEMPLATE *  template)
Creation of a primary key.
Depending on the flags stored in the context the creation of a primary key will be prepared.
Parameters:
in	context 	The FAPI_CONTEXT. 	
in	template 	The template which defines the key attributes and whether the key will be persistent. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_VALUE 	if a wrong type was passed. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if an error occurred while accessing the object store. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_FAPI_RC_PATH_ALREADY_EXISTS 	if the object already exists in object store. 	
TSS2_RC ifapi_esys_serialize_object (ESYS_CONTEXT *  ectx, IFAPI_OBJECT *  object)
Serialize persistent objects into buffer of keystore object.
NV objects and persistent keys will serialized via the ESYS API to enable reconstruction durinng loading from keystore.
Parameters:
in	ectx 	The ESAPI context. 	
in,out	object 	The nv object or the key. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occured. 	
TSS2_RC ifapi_flush_object (FAPI_CONTEXT *  context, ESYS_TR  handle)
State machine for flushing objects.
Parameters:
in	context 	The FAPI_CONTEXT. 	
in	handle 	of the object to be flushed.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
void ifapi_flush_policy_session (FAPI_CONTEXT *  context, ESYS_TR  session, TSS2_RC  r)
Check whether policy session has to be flushed.
Policy sessions with cleared continue session flag are not flushed in error cases. Therefore the return code will be checked and if a policy session was used the session will be flushed if the command was not executed successfully.
Parameters:
in,out	context 	for storing all state information. 	
in	session 	the session to be checked whether flush is needed. 	
in	r 	The return code of the command using the session. 	
void ifapi_free_object (FAPI_CONTEXT *  context, IFAPI_OBJECT **  object)
Free ifapi a object stored in the context.
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
in,out	object 	The object which should be removed from the the linked list stored in context. 	
void ifapi_free_objects (FAPI_CONTEXT *  context)
Free all ifapi objects stored in the context.
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
TSS2_RC ifapi_get_certificates (FAPI_CONTEXT *  context, UINT32  min_handle, UINT32  max_handle, NODE_OBJECT_T **  cert_list)
Get certificates stored in NV ram.
The NV handles in the certificate range are determined. The corresponding certificates are read out and stored in a linked list.
Parameters:
in,out	context 	The FAPI_CONTEXT. The sub context for NV reading will be used. 	
in	min_handle 	The first possible handle in the handle range. 	
in	max_handle 	Maximal handle to filter out the handles not in the handle range for certificates. 	
out	cert_list 	The callee allocates linked list of certificates.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated.	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_IO_ERROR 	if an error occurred while accessing the object store. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_RC ifapi_get_description (IFAPI_OBJECT *  object, char **  description)
Get description of an internal FAPI object.
Parameters:
in	object 	The object with the description. 	
out	description 	The callee allocated description.	
Return values:
TSS2_RC_SUCCESS 	If a copy of the description can be returned or if no description exists. 	
TSS2_FAPI_RC_MEMORY 	in the copy cannot be allocated. 	
TSS2_RC ifapi_get_free_handle_async (FAPI_CONTEXT *  fctx, TPM2_HANDLE *  handle)
Preparation for getting a free handle after a start handle number.
Parameters:
in	fctx 	The FAPI_CONTEXT. 	
in	handle 	The start value for handle search.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_RC ifapi_get_free_handle_finish (FAPI_CONTEXT *  fctx, TPM2_HANDLE *  handle, TPM2_HANDLE  max)
Execution of get capability until a free handle is found.
The get capability method is called until a free handle is found or the max number of trials passe to the function is exeeded.
Parameters:
in	fctx 	The FAPI_CONTEXT. 	
out	handle 	The free handle. 	
in	max 	The maximal number of trials.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_NV_TOO_SMALL 	if too many NV handles are defined. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_RC ifapi_get_json (FAPI_CONTEXT *  context, IFAPI_OBJECT *  object, char **  json_string)
Get json encoding for FAPI object.
A json representation which can be used for exporting of a FAPI object will be created.
Parameters:
in	context 	The FAPI_CONTEXT. 	
in	object 	The object to be serialized. 	
out	json_string 	The json string created by the deserialzation function (callee-allocated).	
Return values:
TSS2_RC_SUCCESS 	If the serialization was successful. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_BAD_VALUE 	If wrong values are detected during serialization. 	
TSS2_FAPI_RC_BAD_REFERENCE 	If a NULL pointer was passed for the object. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
ifapi_get_key_properties (FAPI_CONTEXT *  context, char const *  key_path, bool *  is_primary, bool *  in_null_hierarchy)
Determine key properties (primary, null hierarchy).
It will be checked whether a path is the path of a primary key, and whether it's a key in null hiearchy
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
in	key_path 	the key path. 	
out	is_primary 	if key path is the path of a primary. 	
out	in_null_hierarchy 	if key is a null hierarchy key.	
Return values:
TSS2_RC_SUCCESS 	If the preparation is successful. 	
TSS2_FAPI_RC_MEMORY 	if memory could not be allocated for path names. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
ifapi_get_object_path (IFAPI_OBJECT *  object)
Get relative path of a FAPI object.
Parameters:
in	object 	The internal FAPI object.	
Return values:
The 	relative path of the object. 	
NULL 	if no path is available. 	
TSS2_RC ifapi_get_random (FAPI_CONTEXT *  context, size_t  numBytes, uint8_t **  data)
State machine to retrieve random data from TPM.
If the buffer size exceeds the maximum size, several ESAPI calls are made.
Parameters:
in,out	context 	for storing all state information. 	
in	numBytes 	Number of random bytes to be computed. 	
out	data 	The random data.	
Return values:
TSS2_RC_SUCCESS 	If random data can be computed. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_RC ifapi_get_session_async (ESYS_CONTEXT *  esys, ESYS_TR  saltkey, const IFAPI_PROFILE *  profile, TPMI_ALG_HASH  hashAlg)
Preparation for getting a session handle.
The corresponding async call be executed and a session secret for encryption TPM2B parameters will be created.
Parameters:
in	esys 	The ESYS_CONTEXT. 	
in	saltkey 	The key which will be used for the encryption of the session secret. 	
in	profile 	The FAPI profile will be used to adjust the sessions symmetric parameters. 	
in	hashAlg 	The hash algorithm used for the session.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_RC ifapi_get_session_finish (ESYS_CONTEXT *  esys, ESYS_TR *  session, TPMA_SESSION  flags)
Call for getting a session handle and adjust session parameters.
Parameters:
in	esys 	The ESYS_CONTEXT. 	
out	session 	The session handle. 	
in	flags 	The flags to adjust the session attributes.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_RC ifapi_get_sessions_async (FAPI_CONTEXT *  context, IFAPI_SESSION_TYPE  session_flags, TPMA_SESSION  attribute_flags1, TPMA_SESSION  attribute_flags2)
Prepare the session creation of a FAPI command.
The initial state of the state machine for session creation will be determined. Depending of the session_flags creation of a primary for the encryption of the session secret can be adjusted. The session passed session attributes will be used for the ESAPI command Esys_TRSess_SetAttributes.
Parameters:
in	context 	The FAPI_CONTEXT storing the used handles. 	
in	session_flags 	The flags to adjust used session and encryption key. With IFAPI_SESSION1 and IFAPI_SESSION2 the session creation for sesion1 and session2 can be activated, IFAPI_SESSION_GENEK triggers the creation of the primary for session secret encryption. 	
in	attribute_flags1 	The attributes used for session1. 	
in	attribute_flags2 	The attributes used for session2.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if the hierarchy file or the primary key file does not exist. 	
TSS2_FAPI_RC_MEMORY 	if memory could not be allocated for path names. of the primary. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_IO_ERROR 	if an error occurred while accessing the object store. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_RC ifapi_get_sessions_finish (FAPI_CONTEXT *  context, const IFAPI_PROFILE *  profile, TPMI_ALG_HASH  hash_alg)
State machine for the session creation of a FAPI command.
The sessions needed for a FAPI command will be created. If needed also the primary key for session encryption will be created.
Parameters:
in	context 	The FAPI_CONTEXT storing the used handles. 	
in	profile 	The FAPI profile will be used to adjust session parameters. 	
in	hash_alg 	The hash algorithm used for the session.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_IO_ERROR 	if an I/O error was encountered. 	
TSS2_FAPI_RC_MEMORY 	if memory could not be allocated for path names. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_RC ifapi_get_sig_scheme (FAPI_CONTEXT *  context, IFAPI_OBJECT *  object, char const *  padding, TPM2B_DIGEST *  digest, TPMT_SIG_SCHEME *  sig_scheme)
Get signature scheme for key.
If padding is passed the scheme will be derived from paddint otherwise the scheme form object will be used.
Parameters:
in	context 	The FAPI_CONTEXT. 	
in	object 	The internal FAPI object of the key. 	
in	padding 	The strings RSA_SSA or RSA_PSS will be converted into the TSS constants used for the signing scheme. 	
in	digest 	The digest size will be used to determine the hashalg for the signature scheme. 	
out	sig_scheme 	The computed signature scheme.	
Return values:
TSS2_FAPI_RC_BAD_VALUE 	If the digest size is not appropriate. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_init_primary_async (FAPI_CONTEXT *  context, TSS2_KEY_TYPE  ktype)
Prepare the creation of a primary key.
Depending on the parameters the creation of an endorsement or storage root key will be prepared.
Parameters:
in	context 	The FAPI_CONTEXT. 	
in	ktype 	The type of key TSS2_EK or TSS2_SRK. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_VALUE 	if a wrong type was passed. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if an error occurred while accessing the object store. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
< no path needed 
TSS2_RC ifapi_initialize_object (ESYS_CONTEXT *  ectx, IFAPI_OBJECT *  object)
Initialize the part of an IFAPI_OBJECT which is not serialized.
For persistent objects the correspodning ESYS object will be created.
Parameters:
in,out	ectx 	The ESYS context. 	
out	object 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_key_create (FAPI_CONTEXT *  context, IFAPI_KEY_TEMPLATE *  template)
State machine for key creation.
The function for the preparation of the key have to called before the state machine can be activated. The linked list for the used directories must be available in the FAPI context. It will be checked whether the object already exists in key store and the FAPI context will be initialized appropriate for key creation.
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
in	template 	The template which defines the key attributes and whether the key will be persistent.	
Return values:
TSS2_RC_SUCCESS 	If the key could be generated. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	If an internal error occurs, which is not covered by other return codes. 	
TSS2_FAPI_RC_BAD_VALUE 	If wrong values are detected during execution. 	
TSS2_FAPI_RC_IO_ERROR 	If an error occurs during access to the policy store. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	If an object needed for creation or authentication was not found. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	If policy search for a certain policy digest was not successful. 	
TPM2_RC_BAD_AUTH 	If the authentication for an object needed for creation fails. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a needed authorization callback is not defined. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_PATH_ALREADY_EXISTS 	if the object already exists in object store. 	
TSS2_RC ifapi_key_create_prepare (FAPI_CONTEXT *  context, char const *  keyPath, char const *  policyPath)
Prepare key creation if possible.
It will be checked whether the object already exists in key store and the FAPI context will be initialized appropriate for key creation.
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
in	keyPath 	the key path without the parent directories of the key store. (e.g. HE/EK, HS/SRK/mykey) 	
in	policyPath 	identifies the policy to be associated with the new key. policyPath MAY be NULL. If policyPath is NULL then no policy will be associated with the key.	
Return values:
TSS2_RC_SUCCESS 	If the preparation was successful. 	
TSS2_FAPI_RC_PATH_ALREADY_EXISTS 	If the object with does already exist in keystore. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_RC ifapi_key_create_prepare_auth (FAPI_CONTEXT *  context, char const *  keyPath, char const *  policyPath, char const *  authValue)
Prepare key creation with an auth value.
The auth value will be copied int the FAPI context for later use in key creation.
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
in	keyPath 	the key path without the parent directories of the key store. (e.g. HE/EK, HS/SRK/mykey) 	
in	policyPath 	identifies the policy to be associated with the new key. policyPath MAY be NULL. If policyPath is NULL then no policy will be associated with the key. 	
in	authValue 	The authentication value of the key.	
Return values:
TSS2_RC_SUCCESS 	If the preparation was successful. 	
TSS2_FAPI_RC_PATH_ALREADY_EXISTS 	If the object with does already exist in keystore. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_RC ifapi_key_create_prepare_sensitive (FAPI_CONTEXT *  context, char const *  keyPath, char const *  policyPath, size_t  dataSize, char const *  authValue, uint8_t const *  data)
Prepare key creation with an auth value and sensitive data.
The auth value and the sensitive data will be copied int the FAPI context for later use in key creation.
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
in	keyPath 	the key path without the parent directories of the key store. (e.g. HE/EK, HS/SRK/mykey) 	
in	policyPath 	identifies the policy to be associated with the new key. policyPath MAY be NULL. If policyPath is NULL then no policy will be associated with the key. 	
in	dataSize 	The size of the sensitive data. 	
in	authValue 	The authentication value of the key. 	
in	data 	The sensitive data.	
Return values:
TSS2_RC_SUCCESS 	If the preparation was successful. 	
TSS2_FAPI_RC_PATH_ALREADY_EXISTS 	If the object with does already exist in keystore. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_NO_TPM 	if FAPI was initialized in no-TPM-mode via its config file. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_RC ifapi_key_sign (FAPI_CONTEXT *  context, IFAPI_OBJECT *  sig_key_object, char const *  padding, TPM2B_DIGEST *  digest, TPMT_SIGNATURE **  tpm_signature, char **  publicKey, char **  certificate)
State machine for signing operation.
The key used for signing will be authorized and the signing of the passed data will be executed.
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
in	sig_key_object 	The Fapi key object which will be used to sign the passed digest. 	
in	padding 	is the padding algorithm used. Possible values are RSA_SSA, RSA_PPSS (case insensitive). padding MAY be NULL. 	
in	digest 	is the data to be signed, already hashed. digest MUST NOT be NULL. 	
out	tpm_signature 	returns the signature in binary form (DER format). tpm_signature MUST NOT be NULL (callee-allocated). 	
out	publicKey 	is the public key of the signing key in PEM format. publicKey is callee allocated and MAY be NULL. 	
out	certificate 	is the certificate associated with the signing key in PEM format. certificate MAY be NULL.	
Return values:
TSS2_RC_SUCCESS 	If the signing was successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	If an internal error occurs, which is not covered by other return codes. 	
TSS2_FAPI_RC_BAD_VALUE 	If wrong values are detected during execution. 	
TSS2_FAPI_RC_IO_ERROR 	If an error occurs during access to the policy store. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	If a policy for a certain path was not found. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	If policy search for a certain policy digest was not successful. 	
TSS2_FAPI_RC_BAD_TEMPLATE 	In a invalid policy is loaded during execution. 	
TPM2_RC_BAD_AUTH 	If the authentication for an object needed for policy execution fails. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a needed authorization callback is not defined. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_RC ifapi_load_key (FAPI_CONTEXT *  context, char const *  keyPath, IFAPI_OBJECT **  key_object)
Load a key and initialize profile and session for ESAPI execution.
This state machine prepares the session for key loading. Some session related parameters will be taken from profile.
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
in	keyPath 	the key path without the parent directories of the key store. (e.g. HE/EK, HS/SRK/mykey) 	
out	key_object 	The callee allocated internal representation of a key object.	
Return values:
TSS2_RC_SUCCESS 	If the key was loaded successfully. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	If an internal error occurs, which is not covered by other return codes. 	
TSS2_FAPI_RC_BAD_VALUE 	If wrong values are detected during execution. 	
TSS2_FAPI_RC_IO_ERROR 	If an error occurs during access to the object store. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	If a policy or key was not found. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	If policy search for a certain policy digest was not successful. 	
TPM2_RC_BAD_AUTH 	If the authentication for an object needed for policy execution fails. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a needed authorization callback is not defined. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_RC ifapi_load_key_async (FAPI_CONTEXT *  context, size_t  position)
Initialize state machine for loading a key.
Parameters:
in,out	context 	for storing all state information. 	
in	position 	the position of the key in path list stored in context->loadKey.path_list.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_MEMORY 	if memory could not be allocated for path names. 	
TSS2_RC ifapi_load_key_finish (FAPI_CONTEXT *  context, bool  flush_parent)
State machine for loading a key.
A stack with all sup keys will be created and decremented during the loading auf all keys. The object of the loaded key will be stored in: context->loadKey.auth_object
Parameters:
in,out	context 	for storing all state information. 	
in	flush_parent 	If flush_parent is false parent is only flushed if a new parent is available.	
Return values:
TSS2_RC_SUCCESS 	If the loading of the key was successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	If an internal error occurs, which is not covered by other return codes. 	
TSS2_FAPI_RC_BAD_VALUE 	If wrong values are detected during execution. 	
TSS2_FAPI_RC_IO_ERROR 	If an error occurs during access to the policy store. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	If an object needed for loading or authentication was not found. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	If policy search for a certain policy digest was not successful. 	
TPM2_RC_BAD_AUTH 	If the authentication for an object needed for loading fails. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a needed authorization callback is not defined. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
< to avoid scan-build errors.
< to avoid scan-build errors. 
TSS2_RC ifapi_load_keys_async (FAPI_CONTEXT *  context, char const *  keyPath)
Asynchronous preparation for loading a key and parent keys.
The key loading is prepared. The pathname will be extended if possible and a linked list with the directories will be created.
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
in	keyPath 	the key path without the parent directories of the key store. (e.g. HE/EK, HS/SRK/mykey)	
Return values:
TSS2_RC_SUCCESS 	If the preparation is successful. 	
TSS2_FAPI_RC_MEMORY 	if memory could not be allocated for path names. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_RC ifapi_load_keys_finish (FAPI_CONTEXT *  context, bool  flush_parent, ESYS_TR *  handle, IFAPI_OBJECT **  key_object)
Asynchronous finish function for loading a key.
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
in	flush_parent 	If false the parent of the key to be loaded will not be flushed. 	
out	handle 	The ESYS handle of the key. 	
out	key_object 	The object which will be used for the authorization of the loaded key. 	
Return values:
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_IO_ERROR 	if an error occurred while accessing the object store. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
ifapi_load_parent_keys_async (FAPI_CONTEXT *  context, char const *  keyPath)
Asynchronous preparation for loading of the parent keys.
The key loading is prepared. The pathname will be extended if possible and a linked list with the directories will be created.
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
in	keyPath 	the key path without the parent directories of the key store. (e.g. HE/EK, HS/SRK/mykey)	
Return values:
TSS2_RC_SUCCESS 	If the preparation is successful. 	
TSS2_FAPI_RC_MEMORY 	if memory could not be allocated for path names. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_RC ifapi_load_primary_async (FAPI_CONTEXT *  context, char *  path)
Prepare the loading of a primary key from key store.
The asynchronous loading or the key from keystore will be prepared and the path will be stored in the FAPI context.
Parameters:
in	context 	The FAPI_CONTEXT. 	
in	path 	The FAPI path of the primary key.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_VALUE 	if a wrong type was passed. 	
TSS2_FAPI_RC_IO_ERROR 	if an I/O error was encountered. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if the file does not exist. 	
TSS2_FAPI_RC_MEMORY 	if memory could not be allocated for path names. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_RC ifapi_load_primary_finish (FAPI_CONTEXT *  context, ESYS_TR *  handle)
State machine to finalize the loading of a primary key from key store.
The asynchronous loading or the key from keystore will be finalized. Afterwards the hierarchy object, which will be used for authorization will be loaded and the ESAPI functions for primary generation will be called if the primary is not persistent.
Parameters:
in	context 	The FAPI_CONTEXT. 	
out	handle 	The object handle of the primary key.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_VALUE 	if a wrong type was passed. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if the hierarchy file does not exist. 	
TSS2_FAPI_RC_IO_ERROR 	if an I/O error was encountered. 	
TSS2_FAPI_RC_MEMORY 	if memory could not be allocated for path names. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a required authorization callback is not set. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	if policy search for a certain policy digest was not successful. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_RC ifapi_merge_profile_into_nv_template (FAPI_CONTEXT *  context, IFAPI_NV_TEMPLATE *  template)
Merge profile already stored in FAPI context into a NV object template.
The defaults for NV creation which are stored in the FAPI default profile will be merged in the passed templates default values.
Parameters:
in	context 	The FAPI_CONTEXT with the default profile. 	
in	template 	The template with the default values for the NV object.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_RC ifapi_merge_profile_into_template (const IFAPI_PROFILE *  profile, IFAPI_KEY_TEMPLATE *  template)
Merge profile already stored in FAPI context into a key template.
The defaults for key creation which are stored in the FAPI default profile will be merged in the passed templates default values.
Parameters:
in	profile 	The profile which will be used to adjust the template. 	
in	template 	The template with the default values for the key object.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_RC ifapi_non_tpm_mode_init (FAPI_CONTEXT *  context)
Prepare session for FAPI command execution without TPM.
It will be checked whether the context of FAPI is initialized and whether no other FAPI command session is running. Also some handle variables in the context are initialized.
Parameters:
in	context 	The FAPI_CONTEXT.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if the context is not initialized. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	If a FAPI command session is active. 	
TSS2_RC ifapi_nv_read (FAPI_CONTEXT *  context, uint8_t **  data, size_t *  size)
State machine to read data from the NV ram of the TPM.
Context nv_cmd has to be prepared before the call of this function:
auth_index The ESAPI handle of the authorization object.
numBytes The number of bytes which should be read.
esys_handle The ESAPI handle of the NV object.
Parameters:
in,out	context 	for storing all state information. 	
out	data 	the data fetched from TPM. 	
in,out	size 	The number of bytes requested and fetched.	
Return values:
TSS2_RC_SUCCESS 	If the data was read successfully. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_BAD_VALUE 	If wrong values are detected during execution. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	If an internal error occurs, which is
not covered by other return codes. 
	
TSS2_FAPI_RC_IO_ERROR 	If an error occurs during access to the object store. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	If a policy for a certain path was not found. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	If policy search for a certain policy digest was not successful. 	
TPM2_RC_BAD_AUTH 	If the authentication for an object needed for the execution fails. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a needed authorization callback is not defined. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_RC ifapi_nv_write (FAPI_CONTEXT *  context, char *  nvPath, size_t  param_offset, uint8_t const *  data, size_t  size)
State machine to write data to the NV ram of the TPM.
The NV object will be read from object store and the data will be written by one, or more than one if necessary, ESAPI calls to the NV ram of the TPM. The sub context nv_cmd will be prepared:
data The buffer for the data which has to be written
offset The current offset for writing
numBytes The number of bytes which have to be written.
Parameters:
in,out	context 	for storing all state information. 	
in	nvPath 	The fapi path of the NV object. 	
in	param_offset 	The offset in the NV memory (will be stored in context). 	
in	data 	The pointer to the data to be written. 	
in	size 	The number of bytes to be written.	
Return values:
TSS2_RC_SUCCESS 	If data can be written. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_BAD_VALUE 	If wrong values are detected during execution. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	If an internal error occurs, which is
not covered by other return codes. 
	
TSS2_FAPI_RC_IO_ERROR 	If an error occurs during access to the object store. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	The nv object or an object needed for authentication was not found. 	
TSS2_FAPI_RC_POLICY_UNKNOWN 	If policy search for a certain policy digest was not successful. 	
TPM2_RC_BAD_AUTH 	If the authentication for an object needed for the command execution fails. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	if a needed authorization callback is not defined. 	
TSS2_FAPI_RC_BAD_PATH 	if a path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_AUTHORIZATION_FAILED 	if the authorization attempt fails. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
void ifapi_primary_clean (FAPI_CONTEXT *  context)
Cleanup primary keys in error cases (non asynchronous).
Parameters:
in	context 	The FAPI_CONTEXT storing the used handles.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_ESYS_RC_* 	possible error codes of ESAPI. 	
void ifapi_session_clean (FAPI_CONTEXT *  context)
Cleanup FAPI sessions in error cases.
The uses sessions and the SRK (if not persistent) will be flushed non asynchronous in error cases.
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
TSS2_RC ifapi_session_init (FAPI_CONTEXT *  context)
Prepare session for FAPI command execution.
It will be checked whether the context of FAPI and ESAPI is initialized and whether no other FAPI command session is running. Also some handle variables in the context are initialized.
Parameters:
in	context 	The FAPI_CONTEXT.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if the context is not initialized. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	If a FAPI command session is active. 	
TSS2_FAPI_RC_NO_TPM 	if the ESAPI context is not initialized. 	
TSS2_RC ifapi_set_auth (FAPI_CONTEXT *  context, IFAPI_OBJECT *  auth_object, const char *  description)
Set authorization value for a FAPI object.
The callback which provides the auth value must be defined.
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
in	auth_object 	The auth value will be assigned to this object. 	
in	description 	The description will be passed to the callback which delivers the auth value.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_AUTHORIZATION_UNKNOWN 	If the callback for getting the auth value is not defined. 	
void ifapi_set_description (IFAPI_OBJECT *  object, char *  description)
Set description of an internal FAPI object.
Parameters:
in,out	object 	The object with the description. 	
in	description 	The description char strint or NULL. 	

Basic IO module
Functions
TSS2_RC ifapi_io_check_file_writeable (const char *file)
TSS2_RC ifapi_io_dirfiles (const char *dirname, char ***files, size_t *numfiles)
TSS2_RC ifapi_io_dirfiles_all (const char *searchPath, char ***pathlist, size_t *numPaths)
bool ifapi_io_path_exists (const char *path)
TSS2_RC ifapi_io_poll (IFAPI_IO *io)
TSS2_RC ifapi_io_poll_handles (IFAPI_IO *io, FAPI_POLL_HANDLE **handles, size_t *num_handles)
TSS2_RC ifapi_io_read_async (struct IFAPI_IO *io, const char *filename)
TSS2_RC ifapi_io_read_finish (struct IFAPI_IO *io, uint8_t **buffer, size_t *length)
TSS2_RC ifapi_io_remove_file (const char *file)
TSS2_RC ifapi_io_write_async (struct IFAPI_IO *io, const char *filename, const uint8_t *buffer, size_t length)
TSS2_RC ifapi_io_write_finish (struct IFAPI_IO *io)

Detailed Description
Provides internal basic IO functions for policy and key store module. 

Function Documentation
TSS2_RC ifapi_io_check_file_writeable (const char *  file)
Check whether a file is writeable.
Parameters:
in	file 	The name of the fileto be checked. 	
Return values:
TSS2_RC_SUCCESS 	if the directories existed or were successfully created 	
TSS2_FAPI_RC_IO_ERROR 	if an I/O error occurred 	
TSS2_RC ifapi_io_dirfiles (const char *  dirname, char ***  files, size_t *  numfiles)
Enumerate the list of files in a directory.
Enumerage the regular files (no directories, symlinks etc) from a given directory.
Parameters:
in	dirname 	The directory to list files from. 	
out	files 	The list of file names. 	
out	numfiles 	The size of files. 	
Return values:
TSS2_RC_SUCCESS 	if the directories were successfully removed 	
TSS2_FAPI_RC_IO_ERROR 	if an I/O error occurred 	
TSS2_FAPI_RC_MEMORY 	if memory could not be allocated to hold the read data. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_io_dirfiles_all (const char *  searchPath, char ***  pathlist, size_t *  numPaths)
Recursive enumerate the list of files in a directory.
Enumerage the regular files (no directories, symlinks etc) from a given directory.
Parameters:
in	searchPath 	The directory to list files from. 	
out	pathlist 	The list of file names. 	
out	numPaths 	The size of files. 	
Return values:
TSS2_RC_SUCCESS 	if the directories were successfully removed 	
TSS2_FAPI_RC_IO_ERROR 	if an I/O error occurred 	
TSS2_FAPI_RC_MEMORY 	if memory could not be allocated to hold the read data. 	
bool ifapi_io_path_exists (const char *  path)
Determine whether a path exists.
Parameters:
in	path 	The absolute path of the file. 	
Return values:
true 	The file exists. 	
false 	The file does not exist. 	
TSS2_RC ifapi_io_poll (IFAPI_IO *  io)
Wait for file I/O to be ready.
If FAPI state automata are in a file I/O state it will be waited for an event on a file descriptor.
Parameters:
in	io 	The input/output context being used for file I/O. 	
Return values:
TSS2_RC_SUCCESS 	After the end of the wait. 	
TSS2_FAPI_RC_IO_ERROR 	if the poll function returns an error. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_io_poll_handles (IFAPI_IO *  io, FAPI_POLL_HANDLE **  handles, size_t *  num_handles)
Get a list of poll handles.
Parameters:
in	io 	The input/output context being used for file I/O. 	
out	handles 	The array with the poll handles. 	
out	num_handles 	The number of poll handles. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_NO_HANDLE 	In no poll events are stored in IO context. 	
TSS2_FAPI_RC_MEMORY 	If the output data cannot be allocated. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_io_read_async (struct IFAPI_IO *  io, const char *  filename)
Start reading a file's complete content into memory in an asynchronous way.
Parameters:
in,out	io 	The input/output context being used for file I/O. 	
in	filename 	The name of the file to be read into memory. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_IO_ERROR 	if an I/O error was encountered; such as the file was not found. 	
TSS2_FAPI_RC_MEMORY 	if memory could not be allocated to hold the read data. 	
TSS2_RC ifapi_io_read_finish (struct IFAPI_IO *  io, uint8_t **  buffer, size_t *  length)
Finish reading a file's complete content into memory in an asynchronous way.
This function needs to be called repeatedly until it does not return TSS2_FAPI_RC_TRY_AGAIN.
Parameters:
in,out	io 	The input/output context being used for file I/O. 	
out	buffer 	The data that was read from file. (callee-allocated; use free()) 	
out	length 	The length of the data that was read from file. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_IO_ERROR 	if an I/O error was encountered; such as the file was not found. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	
TSS2_RC ifapi_io_remove_file (const char *  file)
Remove a file.
Parameters:
in	file 	The absolute path of the file to be removed. 	
Return values:
TSS2_RC_SUCCESS 	If the file was successfully removed 	
TSS2_FAPI_RC_IO_ERROR 	If the file could not be removed. 	
TSS2_RC ifapi_io_write_async (struct IFAPI_IO *  io, const char *  filename, const uint8_t *  buffer, size_t  length)
Start writing a buffer into a file in an asynchronous way.
Parameters:
in,out	io 	The input/output context being used for file I/O. 	
in	filename 	The name of the file to be read into memory. 	
in	buffer 	The buffer to be written. 	
in	length 	The number of bytes to be written. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_IO_ERROR 	if an I/O error was encountered; such as the file was not found. 	
TSS2_FAPI_RC_MEMORY 	if memory could not be allocated to hold the read data. 	
TSS2_RC ifapi_io_write_finish (struct IFAPI_IO *  io)
Finish writing a buffer into a file in an asynchronous way.
This function needs to be called repeatedly until it does not return TSS2_FAPI_RC_TRY_AGAIN.
Parameters:
in,out	io 	The input/output context being used for file I/O. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_IO_ERROR 	if an I/O error was encountered; such as the file was not found. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	

Key store module
Functions
void ifapi_cleanup_ifapi_duplicate (IFAPI_DUPLICATE *duplicate)
void ifapi_cleanup_ifapi_ext_pub_key (IFAPI_EXT_PUB_KEY *key)
void ifapi_cleanup_ifapi_hierarchy (IFAPI_HIERARCHY *hierarchy)
void ifapi_cleanup_ifapi_key (IFAPI_KEY *key)
void ifapi_cleanup_ifapi_keystore (IFAPI_KEYSTORE *keystore)
void ifapi_cleanup_ifapi_nv (IFAPI_NV *nv)
void ifapi_cleanup_ifapi_object (IFAPI_OBJECT *object)
TSS2_RC ifapi_copy_ifapi_key (IFAPI_KEY *dest, const IFAPI_KEY *src)
TSS2_RC ifapi_copy_ifapi_key_object (IFAPI_OBJECT *dest, const IFAPI_OBJECT *src)
TSS2_RC ifapi_keystore_delete (IFAPI_KEYSTORE *keystore, char *path)
TSS2_RC ifapi_keystore_initialize (IFAPI_KEYSTORE *keystore, const char *config_systemdir, const char *config_userdir, const char *config_defaultprofile)
TSS2_RC ifapi_keystore_list_all (IFAPI_KEYSTORE *keystore, const char *searchpath, char ***results, size_t *numresults)
TSS2_RC ifapi_keystore_load_async (IFAPI_KEYSTORE *keystore, IFAPI_IO *io, const char *path)
TSS2_RC ifapi_keystore_load_finish (IFAPI_KEYSTORE *keystore, IFAPI_IO *io, IFAPI_OBJECT *object)
TSS2_RC ifapi_keystore_remove_directories (IFAPI_KEYSTORE *keystore, const char *dir_name)
TSS2_RC ifapi_keystore_search_nv_obj (IFAPI_KEYSTORE *keystore, IFAPI_IO *io, TPM2B_NV_PUBLIC *nv_public, char **found_path)
TSS2_RC ifapi_keystore_search_obj (IFAPI_KEYSTORE *keystore, IFAPI_IO *io, TPM2B_NAME *name, char **found_path)
TSS2_RC ifapi_keystore_store_async (IFAPI_KEYSTORE *keystore, IFAPI_IO *io, const char *path, const IFAPI_OBJECT *object)
TSS2_RC ifapi_copy_ifapi_hierarchy (IFAPI_HIERARCHY *dest, const IFAPI_HIERARCHY *src)
TSS2_RC ifapi_copy_ifapi_hierarchy_object (IFAPI_OBJECT *dest, const IFAPI_OBJECT *src)
TSS2_RC ifapi_keystore_object_does_not_exist (IFAPI_KEYSTORE *keystore, const char *path, const IFAPI_OBJECT *object)

Detailed Description
Provides internal fapi functions for reading and writing to the key store. 

Function Documentation
void ifapi_cleanup_ifapi_duplicate (IFAPI_DUPLICATE *  duplicate)
Free memory allocated during deserialization of a duplicate object.
The duplicate object will not be freed (might be declared on the stack).
Parameters:
in	duplicate 	The duplicate object to be cleaned up. 	
void ifapi_cleanup_ifapi_ext_pub_key (IFAPI_EXT_PUB_KEY *  key)
Free memory allocated during deserialization of a pubkey object.
The pubkey will not be freed (might be declared on the stack).
Parameters:
in	key 	The pubkey object to be cleaned up. 	
void ifapi_cleanup_ifapi_hierarchy (IFAPI_HIERARCHY *  hierarchy)
Free memory allocated during deserialization of a hierarchy object.
The hierarchy object will not be freed (might be declared on the stack).
Parameters:
in	hierarchy 	The hierarchy object to be cleaned up. 	
void ifapi_cleanup_ifapi_key (IFAPI_KEY *  key)
Free memory allocated during deserialization of a key object.
The key will not be freed (might be declared on the stack).
Parameters:
in	key 	The key object to be cleaned up. 	
void ifapi_cleanup_ifapi_keystore (IFAPI_KEYSTORE *  keystore)
Free keystore related memory allocated during FAPI initialization.
The keystore object will not be freed (might be declared on the stack).
Parameters:
in	keystore 	The kystore object to be cleaned up. 	
void ifapi_cleanup_ifapi_nv (IFAPI_NV *  nv)
Free memory allocated during deserialization of a nv object.
The nv object will not be freed (might be declared on the stack).
Parameters:
in	nv 	The nv object to be cleaned up. 	
void ifapi_cleanup_ifapi_object (IFAPI_OBJECT *  object)
Free memory allocated during deserialization of object.
The object will not be freed (might be declared on the stack).
Parameters:
in	object 	The object to be cleaned up. 	
ifapi_copy_ifapi_hierarchy (IFAPI_HIERARCHY *  dest, const IFAPI_HIERARCHY *  src)
Create a copy of a an ifapi hierarchy.
Parameters:
out	dest 	The caller allocated hierarchy object which will be the destination of the copy operation. 	
in	src 	The source hierarchy.	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
ifapi_copy_ifapi_hierarchy_object (IFAPI_OBJECT *  dest, const IFAPI_OBJECT *  src)
Create a copy of a an ifapi object storing a hierarchy.
The hierarchy together with the policy of the hierarchy will be copied.
Parameters:
out	dest 	The caller allocated hierarchy object which will be the destination of the copy operation. 	
in	src 	The source hieararchy.	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if the source is not of type key. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_copy_ifapi_key (IFAPI_KEY *  dest, const IFAPI_KEY *  src)
Create a copy of a an ifapi key.
Parameters:
out	dest 	The caller allocated key object which will be the destination of the copy operation. 	
in	src 	The source key.	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_copy_ifapi_key_object (IFAPI_OBJECT *  dest, const IFAPI_OBJECT *  src)
Create a copy of a an ifapi object storing a key.
The key together with the policy of the key will be copied.
Parameters:
out	dest 	The caller allocated key object which will be the destination of the copy operation. 	
in	src 	The source key.	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if the source is not of type key. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_keystore_delete (IFAPI_KEYSTORE *  keystore, char *  path)
Remove file storing a keystore object.
Parameters:
in	keystore 	The key directories, the default profile. 	
in	path 	The relative name of the object be removed. 	
Return values:
TSS2_RC_SUCCESS 	On success. 	
TSS2_FAPI_RC_MEMORY 	If memory could not be allocated. 	
TSS2_FAPI_RC_IO_ERROR 	If the file can't be removed. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_RC ifapi_keystore_initialize (IFAPI_KEYSTORE *  keystore, const char *  config_systemdir, const char *  config_userdir, const char *  config_defaultprofile)
Store keystore parameters in the keystore context.
Also the user directory will be created if it does not exist.
Parameters:
out	keystore 	The keystore to be initialized. 	
in	config_systemdir 	The configured system directory. 	
in	config_userdir 	The configured user directory. 	
in	config_defaultprofile 	The configured profile.	
Return values:
TSS2_RC_SUCCESS 	If the keystore can be initialized. 	
TSS2_FAPI_RC_IO_ERROR 	If the user part of the keystore can't be initialized. 	
TSS2_FAPI_RC_MEMORY 	if memory could not be allocated. 	
TSS2_FAPI_RC_BAD_PATH 	if the home directory of the user cannot be determined. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_RC ifapi_keystore_list_all (IFAPI_KEYSTORE *  keystore, const char *  searchpath, char ***  results, size_t *  numresults)
Create a list of of objects in a certain search path.
A vector of relative paths will be computed.
Parameters:
in	keystore 	The key directories, the default profile. 	
in	searchpath 	The relative search path in key store. 	
out	results 	The array with pointers to the relative object paths. 	
out	numresults 	The number of found objects. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_MEMORY 	if memory could not be allocated. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_RC ifapi_keystore_load_async (IFAPI_KEYSTORE *  keystore, IFAPI_IO *  io, const char *  path)
Start loading FAPI object from key store.
Keys objects, NV objects, and hierarchies can be loaded.
Parameters:
in	keystore 	The key directories and default profile. 	
in	io 	The input/output context being used for file I/O. 	
in	path 	The relative path of the object. For keys the path will expanded if possible. 	
Return values:
TSS2_RC_SUCCESS 	If the object can be read. 	
TSS2_FAPI_RC_IO_ERROR 	if an I/O error was encountered. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if the file does not exist. 	
TSS2_FAPI_RC_MEMORY 	if memory could not be allocated to hold the read data. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	if a key was not found. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
ifapi_keystore_object_does_not_exist (IFAPI_KEYSTORE *  keystore, const char *  path, const IFAPI_OBJECT *  object)
Check whether the key path for a new object does not exist in key store.
To prevent overwriting of objects the functions returns an error if the object is already stored in key store. The FAPI path will be expanded to absolute path appropriate for the object to be checked.
Parameters:
in	keystore 	The key directories and default profile. 	
in	path 	The relative path of the object. For keys the path will expanded if possible. 	
in	object 	The object to be checked. 	
Return values:
TSS2_RC_SUCCESS 	if the object does not exist and a new object can be written. 	
TSS2_FAPI_RC_PATH_ALREADY_EXISTS 	if the object exists in key store. 	
TSS2_FAPI_RC_MEMORY 	if memory could not be allocated to hold the output data. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_RC ifapi_keystore_remove_directories (IFAPI_KEYSTORE *  keystore, const char *  dir_name)
Remove directories in keystore.
If the expanded directory exists in userdir and systemdir both will be deleted.
Parameters:
in	keystore 	The key directories, the default profile. 	
in	dir_name 	The relative name of the directory to be removed. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_MEMORY 	If memory could not be allocated. 	
TSS2_FAPI_RC_IO_ERROR 	If directory can't be deleted. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_RC ifapi_keystore_search_nv_obj (IFAPI_KEYSTORE *  keystore, IFAPI_IO *  io, TPM2B_NV_PUBLIC *  nv_public, char **  found_path)
Search nv object with a certain nv_index (from nv_public) in keystore.
Parameters:
in,out	keystore 	The key directories, the default profile, and the state information for the asynchronous search. 	
in	io 	The input/output context being used for file I/O. 	
in	nv_public 	The public data of the searched nv object. 	
out	found_path 	The relative path of the found key. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_MEMORY 	if memory could not be allocated. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	If the key was not found in keystore. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_IO_ERROR 	if an error occurred while accessing the object store. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_PATH_ALREADY_EXISTS 	if the object already exists in object store. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_RC ifapi_keystore_search_obj (IFAPI_KEYSTORE *  keystore, IFAPI_IO *  io, TPM2B_NAME *  name, char **  found_path)
Search object with a certain name in keystore.
Parameters:
in,out	keystore 	The key directories, the default profile, and the state information for the asynchronous search. 	
in	io 	The input/output context being used for file I/O. 	
in	name 	The name of the searched object. 	
out	found_path 	The relative path of the found key. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_MEMORY 	if memory could not be allocated. 	
TSS2_FAPI_RC_KEY_NOT_FOUND 	If the key was not found in keystore. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_IO_ERROR 	if an error occurred while accessing the object store. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_NOT_PROVISIONED 	FAPI was not provisioned. 	
TSS2_RC ifapi_keystore_store_async (IFAPI_KEYSTORE *  keystore, IFAPI_IO *  io, const char *  path, const IFAPI_OBJECT *  object)
Start writing FAPI object to the key store.
Keys objects, NV objects, and hierarchies can be written.
Parameters:
in	keystore 	The key directories and default profile. 	
in	io 	The input/output context being used for file I/O. 	
in	path 	The relative path of the object. For keys the path will expanded if possible. 	
in	object 	The object to be written to the keystore. 	
Return values:
TSS2_RC_SUCCESS 	if the object is written successfully. 	
TSS2_FAPI_RC_IO_ERROR 	if an I/O error was encountered; 	
TSS2_FAPI_RC_MEMORY 	if memory could not be allocated to hold the output data. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_BAD_PATH 	if the path is used in inappropriate context or contains illegal characters. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if a FAPI object path was not found during authorization. 	

Policy store module
Functions
TSS2_RC ifapi_policy_delete (IFAPI_POLICY_STORE *pstore, char *path)
TSS2_RC ifapi_policy_store_initialize (IFAPI_POLICY_STORE *pstore, const char *config_policydir)
TSS2_RC ifapi_policy_store_load_async (IFAPI_POLICY_STORE *pstore, IFAPI_IO *io, const char *path)
TSS2_RC ifapi_policy_store_load_finish (IFAPI_POLICY_STORE *pstore, IFAPI_IO *io, TPMS_POLICY *policy)
TSS2_RC ifapi_policy_store_store_async (IFAPI_POLICY_STORE *pstore, IFAPI_IO *io, const char *path, const TPMS_POLICY *policy)
TSS2_RC ifapi_policy_store_store_finish (IFAPI_POLICY_STORE *pstore, IFAPI_IO *io)

Detailed Description
Provides internal fapi functions for reading and writing to the policy store. 

Function Documentation
TSS2_RC ifapi_policy_delete (IFAPI_POLICY_STORE *  pstore, char *  path)
Remove file storing a policy object.
Parameters:
in	pstore 	The policy directory. 	
in	path 	The relative name of the object be removed. 	
Return values:
TSS2_RC_SUCCESS 	On success. 	
TSS2_FAPI_RC_MEMORY 	If memory could not be allocated. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	If no file is found in policy store. 	
TSS2_FAPI_RC_IO_ERROR 	If the file can't be removed. 	
TSS2_RC ifapi_policy_store_initialize (IFAPI_POLICY_STORE *  pstore, const char *  config_policydir)
Store policy store parameters in the policy store context.
Also the user directory will be created if it does not exist.
Parameters:
out	pstore 	The keystore to be initialized. 	
in	config_policydir 	The configured policy directory. 	
Return values:
TSS2_RC_SUCCESS 	If the keystore can be initialized. 	
TSS2_FAPI_RC_IO_ERROR 	If the policy store can't be initialized. 	
TSS2_FAPI_RC_MEMORY 	if memory could not be allocated. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_policy_store_load_async (IFAPI_POLICY_STORE *  pstore, IFAPI_IO *  io, const char *  path)
Start loading FAPI policy from policy store.
Keys objects, NV objects, and hierarchies can be loaded.
Parameters:
in	pstore 	The policy directory. 	
in	io 	The input/output context being used for file I/O. 	
in	path 	The relative path of the object. For keys the path will expanded if possible. 	
Return values:
TSS2_RC_SUCCESS 	If the object can be read. 	
TSS2_FAPI_RC_IO_ERROR 	if an I/O error was encountered. 	
TSS2_FAPI_RC_PATH_NOT_FOUND 	if the file does not exist. 	
TSS2_FAPI_RC_MEMORY 	if memory could not be allocated to hold the read data. 	
TSS2_RC ifapi_policy_store_load_finish (IFAPI_POLICY_STORE *  pstore, IFAPI_IO *  io, TPMS_POLICY *  policy)
Finish loading FAPI policy from policy store.
This function needs to be called repeatedly until it does not return TSS2_FAPI_RC_TRY_AGAIN.
Parameters:
in	pstore 	The policy context with the policy directory. 	
in,out	io 	The input/output context being used for file I/O. 	
in	policy 	The caller allocated policy which will loaded from policy store. 	
Return values:
TSS2_RC_SUCCESS 	After successfully loading the object. 	
TSS2_FAPI_RC_IO_ERROR 	if an I/O error was encountered; such as the file was not found. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_policy_store_store_async (IFAPI_POLICY_STORE *  pstore, IFAPI_IO *  io, const char *  path, const TPMS_POLICY *  policy)
Start writing FAPI object to the key store.
The relative path will be expanded, if the default policy directory (/policy) is not part of the path.
Parameters:
in	pstore 	The policy context with the policy directory. 	
in	io 	The input/output context being used for file I/O. 	
in	path 	The relative path of the policy. 	
in	policy 	The policy to be written to the policy store. 	
Return values:
TSS2_RC_SUCCESS 	If the policy is written successfully. 	
TSS2_FAPI_RC_IO_ERROR 	If an I/O error was encountered; 	
TSS2_FAPI_RC_MEMORY 	If memory could not be allocated to hold the output data. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_RC ifapi_policy_store_store_finish (IFAPI_POLICY_STORE *  pstore, IFAPI_IO *  io)
Finish writing a FAPI policy object to the policy store.
This function needs to be called repeatedly until it does not return TSS2_FAPI_RC_TRY_AGAIN.
Parameters:
in	pstore 	The policy context with the policy directory. 	
in,out	io 	The input/output context being used for file I/O. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_IO_ERROR 	if an I/O error was encountered; such as the file was not found. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the asynchronous operation is not yet complete. Call this function again later. 	

Configuration utilities.
Functions
TSS2_RC ifapi_config_initialize_async (IFAPI_IO *io)
TSS2_RC ifapi_config_initialize_finish (IFAPI_IO *io, IFAPI_CONFIG *config)

Detailed Description
Provides internal fapi functions for deserialization of the configuration data and the initialization of the configuration. 

Function Documentation
TSS2_RC ifapi_config_initialize_async (IFAPI_IO *  io)
Starts the initialization of the FAPI configuration.
Parameters:
in	io 	An IO object for file system access	
Return values:
TSS2_RC_SUCCESS 	on success 	
TSS2_FAPI_RC_BAD_REFERENCE 	if io is NULL 	
TSS2_FAPI_RC_IO_ERROR 	if an error occurred while accessing the object store. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_config_initialize_finish (IFAPI_IO *  io, IFAPI_CONFIG *  config)
Finishes the initialization of the FAPI configuration. 
Parameters:
in	io 	An IO object for file system access 	
out	config 	The configuration that is initialized	
Return values:
TSS2_RC_SUCCESS 	on success 	
TSS2_FAPI_RC_BAD_REFERENCE 	if config or io is NULL 	
TSS2_FAPI_RC_BAD_VALUE 	if the read configuration file does not hold a valid configuration 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if JSON parsing fails 	
TSS2_FAPI_RC_BAD_PATH 	if the configuration path is invalid 	
TSS2_FAPI_RC_TRY_AGAIN 	if an I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_IO_ERROR 	if an error occurred while accessing the object store. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	

Event log utilities.
Functions
void ifapi_cleanup_event (IFAPI_EVENT *event)
TSS2_RC ifapi_eventlog_append_check (IFAPI_EVENTLOG *eventlog, IFAPI_IO *io)
TSS2_RC ifapi_eventlog_append_finish (IFAPI_EVENTLOG *eventlog, IFAPI_IO *io, const IFAPI_EVENT *pcr_event)
TSS2_RC ifapi_eventlog_get_async (IFAPI_EVENTLOG *eventlog, IFAPI_IO *io, const TPM2_HANDLE *pcrList, size_t pcrListSize)
TSS2_RC ifapi_eventlog_get_finish (IFAPI_EVENTLOG *eventlog, IFAPI_IO *io, char **log)
TSS2_RC ifapi_eventlog_initialize (IFAPI_EVENTLOG *eventlog, const char *log_dir)

Detailed Description
Provides internal fapi functions for the handling of event logs 

Function Documentation
void ifapi_cleanup_event (IFAPI_EVENT *  event)
Free allocated memory for an ifapi event.
Parameters:
in,out	event 	The structure to be cleaned up. 	
TSS2_RC ifapi_eventlog_append_check (IFAPI_EVENTLOG *  eventlog, IFAPI_IO *  io)
Check event log format before appending an event to the existing event log.
Call after ifapi_eventlog_get_async.
Parameters:
in,out	eventlog 	The context area for the eventlog. 	
in,out	io 	The context area for the asynchronous io module. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_IO_ERROR 	if creation of log_dir failed or log_dir is not writable. 	
TSS2_FAPI_RC_MEMORY 	if memory allocation failed. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_eventlog_append_finish (IFAPI_EVENTLOG *  eventlog, IFAPI_IO *  io, const IFAPI_EVENT *  pcr_event)
Append an event to the existing event log.
Call after ifapi_eventlog_get_async.
Parameters:
in,out	eventlog 	The context area for the eventlog. 	
in,out	io 	The context area for the asynchronous io module. 	
in	pcr_event 	The event to be appended to the eventlog. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_IO_ERROR 	if creation of log_dir failed or log_dir is not writable. 	
TSS2_FAPI_RC_MEMORY 	if memory allocation failed. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_eventlog_get_async (IFAPI_EVENTLOG *  eventlog, IFAPI_IO *  io, const TPM2_HANDLE *  pcrList, size_t  pcrListSize)
Retrieve the eventlog for a given list of pcrs using asynchronous io.
Call ifapi_eventlog_get_finish to retrieve the results.
Parameters:
in,out	eventlog 	The context area for the eventlog. 	
in,out	io 	The context area for the asynchronous io module. 	
in	pcrList 	The list of PCR indices to retrieve the log for. 	
in	pcrListSize 	The size of pcrList. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_IO_ERROR 	if creation of log_dir failed or log_dir is not writable. 	
TSS2_FAPI_RC_MEMORY 	if memory allocation failed. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_eventlog_get_finish (IFAPI_EVENTLOG *  eventlog, IFAPI_IO *  io, char **  log)
Retrieve the eventlog for a given list of pcrs using asynchronous io.
Call after ifapi_eventlog_get_async.
Parameters:
in,out	eventlog 	The context area for the eventlog. 	
in,out	io 	The context area for the asynchronous io module. 	
out	log 	The event log for the requested PCRs in JSON format 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_IO_ERROR 	if creation of log_dir failed or log_dir is not writable. 	
TSS2_FAPI_RC_MEMORY 	if memory allocation failed. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the I/O operation is not finished yet and this function needs to be called again. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_BAD_SEQUENCE 	if the context has an asynchronous operation already pending. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_eventlog_initialize (IFAPI_EVENTLOG *  eventlog, const char *  log_dir)
Initialize the eventlog module of FAPI.
Parameters:
in,out	eventlog 	The context area for the eventlog. 	
in	log_dir 	The directory where to put the eventlog data. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_IO_ERROR 	if creation of log_dir failed or log_dir is not writable. 	
TSS2_FAPI_RC_MEMORY 	if memory allocation failed. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	

Profile module
Functions
void ifapi_profiles_finalize (IFAPI_PROFILES *profiles)
TSS2_RC ifapi_profiles_get (const IFAPI_PROFILES *profiles, const char *name, const IFAPI_PROFILE **profile)
TSS2_RC ifapi_profiles_initialize_async (IFAPI_PROFILES *profiles, IFAPI_IO *io, const char *profilesdir, const char *defaultprofile)
TSS2_RC ifapi_profiles_initialize_finish (IFAPI_PROFILES *profiles, IFAPI_IO *io)

Detailed Description
Provides functions for the handling of profiles stored in the object store. 

Function Documentation
void ifapi_profiles_finalize (IFAPI_PROFILES *  profiles)
Sanitizes and frees internal data structures of loaded profiles' information.
Parameters:
in,out	profiles 	The context for the profiles information. 	
TSS2_RC ifapi_profiles_get (const IFAPI_PROFILES *  profiles, const char *  name, const IFAPI_PROFILE **  profile)
Return the profile data for a given profile name.
Returns a (const, not to be free'd) pointer to the profile data for a requested profile. If a NULL profile is requesten, then the default profile is returned. If a keypath is passed in, then the prefix is analysed. If that keypath starts with a profile then this profile is returned. Otherwise the default profile is returned.
Parameters:
in	profiles 	The profiles context 	
in	name 	The name of the profile or the keypath 	
out	profile 	The pointer to the profile data. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if NULL pointers were passed in. 	
TSS2_FAPI_RC_BAD_VALUE 	if a profile is not found. 	
TSS2_RC ifapi_profiles_initialize_async (IFAPI_PROFILES *  profiles, IFAPI_IO *  io, const char *  profilesdir, const char *  defaultprofile)
Initialize the profiles information in the context in an asynchronous way
Load the profile information from disk, fill the dictionary of loaded profiles and fill the default profile information into the context.
Call ifapi_profiles_initialize_finish to complete the operation.
Parameters:
in,out	profiles 	The context for the profiles information. 	
in,out	io 	The input/output context being used for file I/O. 	
in	profilesdir 	The directory to load profile information from. 	
in	defaultprofile 	The name of the default profile to use. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if NULL pointers were passed in. 	
TSS2_FAPI_RC_BAD_VALUE 	if the profilesdir does not exist or is empty. 	
TSS2_FAPI_RC_IO_ERROR 	if creation of log_dir failed or log_dir is not writable. 	
TSS2_FAPI_RC_MEMORY 	if memory allocation failed. 	
TSS2_RC ifapi_profiles_initialize_finish (IFAPI_PROFILES *  profiles, IFAPI_IO *  io)
Initialize the profiles information in the context in an asynchronous way
Call after ifapi_profiles_initialize_async to complete the operation.
Parameters:
in,out	profiles 	The context for the profiles information. 	
in,out	io 	The input/output context being used for file I/O. 	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_BAD_REFERENCE 	if NULL pointers were passed in. 	
TSS2_FAPI_RC_BAD_VALUE 	if a profile could not be loaded. 	
TSS2_FAPI_RC_IO_ERROR 	if creation of log_dir failed or log_dir is not writable. 	
TSS2_FAPI_RC_MEMORY 	if memory allocation failed. 	
TSS2_FAPI_RC_TRY_AGAIN 	if the I/O operation is not finished yet and this function needs to be called again. 	

FAPI object serialization module
Functions
TSS2_RC ifapi_json_FAPI_QUOTE_INFO_serialize (const FAPI_QUOTE_INFO *in, json_object **jso)
TSS2_RC ifapi_json_IFAPI_CAP_INFO_serialize (const IFAPI_CAP_INFO *in, json_object **jso)
TSS2_RC ifapi_json_IFAPI_DUPLICATE_serialize (const IFAPI_DUPLICATE *in, json_object **jso)
TSS2_RC ifapi_json_IFAPI_EVENT_TYPE_serialize (const IFAPI_EVENT_TYPE in, json_object **jso)
TSS2_RC ifapi_json_IFAPI_EVENT_TYPE_serialize_txt (const IFAPI_EVENT_TYPE in, json_object **str_jso)
TSS2_RC ifapi_json_IFAPI_EVENT_UNION_serialize (const IFAPI_EVENT_UNION *in, UINT32 selector, json_object **jso)
TSS2_RC ifapi_json_IFAPI_EVENT_serialize (const IFAPI_EVENT *in, json_object **jso)
TSS2_RC ifapi_json_IFAPI_EXT_PUB_KEY_serialize (const IFAPI_EXT_PUB_KEY *in, json_object **jso)
TSS2_RC ifapi_json_IFAPI_HIERARCHY_serialize (const IFAPI_HIERARCHY *in, json_object **jso)
TSS2_RC ifapi_json_IFAPI_IMA_EVENT_serialize (const IFAPI_IMA_EVENT *in, json_object **jso)
TSS2_RC ifapi_json_IFAPI_INFO_serialize (const IFAPI_INFO *in, json_object **jso)
TSS2_RC ifapi_json_IFAPI_KEY_serialize (const IFAPI_KEY *in, json_object **jso)
TSS2_RC ifapi_json_IFAPI_NV_serialize (const IFAPI_NV *in, json_object **jso)
TSS2_RC ifapi_json_IFAPI_OBJECT_TYPE_CONSTANT_serialize (const IFAPI_OBJECT_TYPE_CONSTANT in, json_object **jso)
TSS2_RC ifapi_json_IFAPI_OBJECT_serialize (const IFAPI_OBJECT *in, json_object **jso)
TSS2_RC ifapi_json_IFAPI_TSS_EVENT_serialize (const IFAPI_TSS_EVENT *in, json_object **jso)
TSS2_RC ifapi_json_UINT8_ARY_serialize (const UINT8_ARY *in, json_object **jso)
TSS2_RC ifapi_json_char_serialize (const char *in, json_object **jso)
TSS2_RC ifapi_json_INT32_serialize (const INT32 in, json_object **jso)
TSS2_RC ifapi_json_TPM2B_CREATION_DATA_serialize (const TPM2B_CREATION_DATA *in, json_object **jso)
TSS2_RC ifapi_json_TPM2B_DATA_serialize (const TPM2B_DATA *in, json_object **jso)
TSS2_RC ifapi_json_TPM2B_DIGEST_serialize (const TPM2B_DIGEST *in, json_object **jso)
TSS2_RC ifapi_json_TPM2B_ECC_PARAMETER_serialize (const TPM2B_ECC_PARAMETER *in, json_object **jso)
TSS2_RC ifapi_json_TPM2B_ENCRYPTED_SECRET_serialize (const TPM2B_ENCRYPTED_SECRET *in, json_object **jso)
TSS2_RC ifapi_json_TPM2B_EVENT_serialize (const TPM2B_EVENT *in, json_object **jso)
TSS2_RC ifapi_json_TPM2B_MAX_NV_BUFFER_serialize (const TPM2B_MAX_NV_BUFFER *in, json_object **jso)
TSS2_RC ifapi_json_TPM2B_NAME_serialize (const TPM2B_NAME *in, json_object **jso)
TSS2_RC ifapi_json_TPM2B_NONCE_serialize (const TPM2B_NONCE *in, json_object **jso)
TSS2_RC ifapi_json_TPM2B_NV_PUBLIC_serialize (const TPM2B_NV_PUBLIC *in, json_object **jso)
TSS2_RC ifapi_json_TPM2B_OPERAND_serialize (const TPM2B_OPERAND *in, json_object **jso)
TSS2_RC ifapi_json_TPM2B_PRIVATE_serialize (const TPM2B_PRIVATE *in, json_object **jso)
TSS2_RC ifapi_json_TPM2B_PUBLIC_KEY_RSA_serialize (const TPM2B_PUBLIC_KEY_RSA *in, json_object **jso)
TSS2_RC ifapi_json_TPM2B_PUBLIC_serialize (const TPM2B_PUBLIC *in, json_object **jso)
TSS2_RC ifapi_json_TPM2_ALG_ID_serialize (const TPM2_ALG_ID in, json_object **jso)
TSS2_RC ifapi_json_TPM2_CAP_serialize (const TPM2_CAP in, json_object **jso)
TSS2_RC ifapi_json_TPM2_CC_serialize (const TPM2_CC in, json_object **jso)
TSS2_RC ifapi_json_TPM2_ECC_CURVE_serialize (const TPM2_ECC_CURVE in, json_object **jso)
TSS2_RC ifapi_json_TPM2_EO_serialize (const TPM2_EO in, json_object **jso)
TSS2_RC ifapi_json_TPM2_GENERATED_serialize (const TPM2_GENERATED in, json_object **jso)
TSS2_RC ifapi_json_TPM2_HANDLE_serialize (const TPM2_HANDLE in, json_object **jso)
TSS2_RC ifapi_json_TPM2_NT_serialize (const TPM2_NT in, json_object **jso)
TSS2_RC ifapi_json_TPM2_PT_PCR_serialize (const TPM2_PT_PCR in, json_object **jso)
TSS2_RC ifapi_json_TPM2_PT_serialize (const TPM2_PT in, json_object **jso)
TSS2_RC ifapi_json_TPM2_ST_serialize (const TPM2_ST in, json_object **jso)
TSS2_RC ifapi_json_TPMA_ALGORITHM_serialize (const TPMA_ALGORITHM in, json_object **jso)
TSS2_RC ifapi_json_TPMA_CC_serialize (const TPMA_CC in, json_object **jso)
TSS2_RC ifapi_json_TPMA_LOCALITY_serialize (const TPMA_LOCALITY in, json_object **jso)
TSS2_RC ifapi_json_TPMA_NV_serialize (const TPMA_NV in, json_object **jso)
TSS2_RC ifapi_json_TPMA_OBJECT_serialize (const TPMA_OBJECT in, json_object **jso)
TSS2_RC ifapi_json_TPMI_AES_KEY_BITS_serialize (const TPMI_AES_KEY_BITS in, json_object **jso)
TSS2_RC ifapi_json_TPMI_ALG_ASYM_SCHEME_serialize (const TPMI_ALG_ASYM_SCHEME in, json_object **jso)
TSS2_RC ifapi_json_TPMI_ALG_ECC_SCHEME_serialize (const TPMI_ALG_ECC_SCHEME in, json_object **jso)
TSS2_RC ifapi_json_TPMI_ALG_HASH_serialize (const TPMI_ALG_HASH in, json_object **jso)
TSS2_RC ifapi_json_TPMI_ALG_KDF_serialize (const TPMI_ALG_KDF in, json_object **jso)
TSS2_RC ifapi_json_TPMI_ALG_KEYEDHASH_SCHEME_serialize (const TPMI_ALG_KEYEDHASH_SCHEME in, json_object **jso)
TSS2_RC ifapi_json_TPMI_ALG_PUBLIC_serialize (const TPMI_ALG_PUBLIC in, json_object **jso)
TSS2_RC ifapi_json_TPMI_ALG_RSA_SCHEME_serialize (const TPMI_ALG_RSA_SCHEME in, json_object **jso)
TSS2_RC ifapi_json_TPMI_ALG_SIG_SCHEME_serialize (const TPMI_ALG_SIG_SCHEME in, json_object **jso)
TSS2_RC ifapi_json_TPMI_ALG_SYM_MODE_serialize (const TPMI_ALG_SYM_MODE in, json_object **jso)
TSS2_RC ifapi_json_TPMI_ALG_CIPHER_MODE_serialize (const TPMI_ALG_CIPHER_MODE in, json_object **jso)
TSS2_RC ifapi_json_TPMI_ALG_SYM_OBJECT_serialize (const TPMI_ALG_SYM_OBJECT in, json_object **jso)
TSS2_RC ifapi_json_TPMI_ECC_CURVE_serialize (const TPMI_ECC_CURVE in, json_object **jso)
TSS2_RC ifapi_json_TPMI_RH_HIERARCHY_serialize (const TPMI_RH_HIERARCHY in, json_object **jso)
TSS2_RC ifapi_json_TPMI_RH_NV_INDEX_serialize (const TPMI_RH_NV_INDEX in, json_object **jso)
TSS2_RC ifapi_json_TPMI_RSA_KEY_BITS_serialize (const TPMI_RSA_KEY_BITS in, json_object **jso)
TSS2_RC ifapi_json_TPMI_ST_ATTEST_serialize (const TPMI_ST_ATTEST in, json_object **jso)
TSS2_RC ifapi_json_TPMI_YES_NO_serialize (const TPMI_YES_NO in, json_object **jso)
TSS2_RC ifapi_json_TPML_ALG_PROPERTY_serialize (const TPML_ALG_PROPERTY *in, json_object **jso)
TSS2_RC ifapi_json_TPML_CCA_serialize (const TPML_CCA *in, json_object **jso)
TSS2_RC ifapi_json_TPML_CC_serialize (const TPML_CC *in, json_object **jso)
TSS2_RC ifapi_json_TPML_DIGEST_VALUES_serialize (const TPML_DIGEST_VALUES *in, json_object **jso)
TSS2_RC ifapi_json_TPML_ECC_CURVE_serialize (const TPML_ECC_CURVE *in, json_object **jso)
TSS2_RC ifapi_json_TPML_HANDLE_serialize (const TPML_HANDLE *in, json_object **jso)
TSS2_RC ifapi_json_TPML_PCR_SELECTION_serialize (const TPML_PCR_SELECTION *in, json_object **jso)
TSS2_RC ifapi_json_TPML_TAGGED_PCR_PROPERTY_serialize (const TPML_TAGGED_PCR_PROPERTY *in, json_object **jso)
TSS2_RC ifapi_json_TPML_TAGGED_TPM_PROPERTY_serialize (const TPML_TAGGED_TPM_PROPERTY *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_ALG_PROPERTY_serialize (const TPMS_ALG_PROPERTY *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_ATTEST_serialize (const TPMS_ATTEST *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_CAPABILITY_DATA_serialize (const TPMS_CAPABILITY_DATA *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_CERTIFY_INFO_serialize (const TPMS_CERTIFY_INFO *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_CLOCK_INFO_serialize (const TPMS_CLOCK_INFO *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_COMMAND_AUDIT_INFO_serialize (const TPMS_COMMAND_AUDIT_INFO *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_CREATION_DATA_serialize (const TPMS_CREATION_DATA *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_CREATION_INFO_serialize (const TPMS_CREATION_INFO *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_ECC_PARMS_serialize (const TPMS_ECC_PARMS *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_ECC_POINT_serialize (const TPMS_ECC_POINT *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_EMPTY_serialize (const TPMS_EMPTY *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_ENC_SCHEME_OAEP_serialize (const TPMS_ENC_SCHEME_OAEP *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_ENC_SCHEME_RSAES_serialize (const TPMS_ENC_SCHEME_RSAES *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_KEYEDHASH_PARMS_serialize (const TPMS_KEYEDHASH_PARMS *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_KEY_SCHEME_ECDH_serialize (const TPMS_KEY_SCHEME_ECDH *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_NV_CERTIFY_INFO_serialize (const TPMS_NV_CERTIFY_INFO *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_NV_PUBLIC_serialize (const TPMS_NV_PUBLIC *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_PCR_SELECTION_serialize (const TPMS_PCR_SELECTION *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_PCR_SELECT_serialize (const TPMS_PCR_SELECT *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_QUOTE_INFO_serialize (const TPMS_QUOTE_INFO *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_RSA_PARMS_serialize (const TPMS_RSA_PARMS *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_SCHEME_ECDAA_serialize (const TPMS_SCHEME_ECDAA *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_SCHEME_HASH_serialize (const TPMS_SCHEME_HASH *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_SCHEME_HMAC_serialize (const TPMS_SCHEME_HMAC *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_SCHEME_KDF1_SP800_108_serialize (const TPMS_SCHEME_KDF1_SP800_108 *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_SCHEME_KDF1_SP800_56A_serialize (const TPMS_SCHEME_KDF1_SP800_56A *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_SCHEME_MGF1_serialize (const TPMS_SCHEME_MGF1 *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_SCHEME_XOR_serialize (const TPMS_SCHEME_XOR *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_SESSION_AUDIT_INFO_serialize (const TPMS_SESSION_AUDIT_INFO *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_SIGNATURE_ECC_serialize (const TPMS_SIGNATURE_ECC *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_SIGNATURE_ECDAA_serialize (const TPMS_SIGNATURE_ECDAA *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_SIGNATURE_ECDSA_serialize (const TPMS_SIGNATURE_ECDSA *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_SIGNATURE_ECSCHNORR_serialize (const TPMS_SIGNATURE_ECSCHNORR *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_SIGNATURE_RSAPSS_serialize (const TPMS_SIGNATURE_RSAPSS *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_SIGNATURE_RSASSA_serialize (const TPMS_SIGNATURE_RSASSA *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_SIGNATURE_RSA_serialize (const TPMS_SIGNATURE_RSA *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_SIGNATURE_SM2_serialize (const TPMS_SIGNATURE_SM2 *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_SIG_SCHEME_ECDAA_serialize (const TPMS_SIG_SCHEME_ECDAA *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_SIG_SCHEME_ECDSA_serialize (const TPMS_SIG_SCHEME_ECDSA *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_SIG_SCHEME_ECSCHNORR_serialize (const TPMS_SIG_SCHEME_ECSCHNORR *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_SIG_SCHEME_RSAPSS_serialize (const TPMS_SIG_SCHEME_RSAPSS *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_SIG_SCHEME_RSASSA_serialize (const TPMS_SIG_SCHEME_RSASSA *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_SIG_SCHEME_SM2_serialize (const TPMS_SIG_SCHEME_SM2 *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_SYMCIPHER_PARMS_serialize (const TPMS_SYMCIPHER_PARMS *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_TAGGED_PCR_SELECT_serialize (const TPMS_TAGGED_PCR_SELECT *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_TAGGED_PROPERTY_serialize (const TPMS_TAGGED_PROPERTY *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_TIME_ATTEST_INFO_serialize (const TPMS_TIME_ATTEST_INFO *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_TIME_INFO_serialize (const TPMS_TIME_INFO *in, json_object **jso)
TSS2_RC ifapi_json_TPMT_ASYM_SCHEME_serialize (const TPMT_ASYM_SCHEME *in, json_object **jso)
TSS2_RC ifapi_json_TPMT_ECC_SCHEME_serialize (const TPMT_ECC_SCHEME *in, json_object **jso)
TSS2_RC ifapi_json_TPMT_HA_serialize (const TPMT_HA *in, json_object **jso)
TSS2_RC ifapi_json_TPMT_KDF_SCHEME_serialize (const TPMT_KDF_SCHEME *in, json_object **jso)
TSS2_RC ifapi_json_TPMT_KEYEDHASH_SCHEME_serialize (const TPMT_KEYEDHASH_SCHEME *in, json_object **jso)
TSS2_RC ifapi_json_TPMT_PUBLIC_serialize (const TPMT_PUBLIC *in, json_object **jso)
TSS2_RC ifapi_json_TPMT_RSA_SCHEME_serialize (const TPMT_RSA_SCHEME *in, json_object **jso)
TSS2_RC ifapi_json_TPMT_SIGNATURE_serialize (const TPMT_SIGNATURE *in, json_object **jso)
TSS2_RC ifapi_json_TPMT_SIG_SCHEME_serialize (const TPMT_SIG_SCHEME *in, json_object **jso)
TSS2_RC ifapi_json_TPMT_SYM_DEF_OBJECT_serialize (const TPMT_SYM_DEF_OBJECT *in, json_object **jso)
TSS2_RC ifapi_json_TPMT_TK_CREATION_serialize (const TPMT_TK_CREATION *in, json_object **jso)
TSS2_RC ifapi_json_TPMU_ASYM_SCHEME_serialize (const TPMU_ASYM_SCHEME *in, UINT32 selector, json_object **jso)
TSS2_RC ifapi_json_TPMU_ATTEST_serialize (const TPMU_ATTEST *in, UINT32 selector, json_object **jso)
TSS2_RC ifapi_json_TPMU_CAPABILITIES_serialize (const TPMU_CAPABILITIES *in, UINT32 selector, json_object **jso)
TSS2_RC ifapi_json_TPMU_HA_serialize (const TPMU_HA *in, UINT32 selector, json_object **jso)
TSS2_RC ifapi_json_TPMU_KDF_SCHEME_serialize (const TPMU_KDF_SCHEME *in, UINT32 selector, json_object **jso)
TSS2_RC ifapi_json_TPMU_PUBLIC_ID_serialize (const TPMU_PUBLIC_ID *in, UINT32 selector, json_object **jso)
TSS2_RC ifapi_json_TPMU_PUBLIC_PARMS_serialize (const TPMU_PUBLIC_PARMS *in, UINT32 selector, json_object **jso)
TSS2_RC ifapi_json_TPMU_SCHEME_KEYEDHASH_serialize (const TPMU_SCHEME_KEYEDHASH *in, UINT32 selector, json_object **jso)
TSS2_RC ifapi_json_TPMU_SIGNATURE_serialize (const TPMU_SIGNATURE *in, UINT32 selector, json_object **jso)
TSS2_RC ifapi_json_TPMU_SIG_SCHEME_serialize (const TPMU_SIG_SCHEME *in, UINT32 selector, json_object **jso)
TSS2_RC ifapi_json_TPMU_SYM_KEY_BITS_serialize (const TPMU_SYM_KEY_BITS *in, UINT32 selector, json_object **jso)
TSS2_RC ifapi_json_TPMU_SYM_MODE_serialize (const TPMU_SYM_MODE *in, UINT32 selector, json_object **jso)
TSS2_RC ifapi_json_UINT16_serialize (const UINT16 in, json_object **jso)
TSS2_RC ifapi_json_UINT32_serialize (const UINT32 in, json_object **jso)
TSS2_RC ifapi_json_UINT64_serialize (UINT64 in, json_object **jso)
TSS2_RC ifapi_json_pcr_select_serialize (const UINT8 sizeofSelect, const BYTE pcrSelect[], json_object **jso)
TSS2_RC ifapi_json_TPMI_POLICYTYPE_serialize (const TPMI_POLICYTYPE in, json_object **jso)
TSS2_RC ifapi_json_TPMI_POLICYTYPE_serialize_txt (const TPMI_POLICYTYPE in, json_object **str_jso)
TSS2_RC ifapi_json_TPML_PCRVALUES_serialize (const TPML_PCRVALUES *in, json_object **jso)
TSS2_RC ifapi_json_TPML_POLICYBRANCHES_serialize (const TPML_POLICYBRANCHES *in, json_object **jso)
TSS2_RC ifapi_json_TPML_POLICYELEMENTS_serialize (const TPML_POLICYELEMENTS *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_PCRVALUE_serialize (const TPMS_PCRVALUE *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_POLICYACTION_serialize (const TPMS_POLICYACTION *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_POLICYAUTHORIZATION_serialize (const TPMS_POLICYAUTHORIZATION *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_POLICYAUTHORIZENV_serialize (const TPMS_POLICYAUTHORIZENV *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_POLICYAUTHORIZE_serialize (const TPMS_POLICYAUTHORIZE *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_POLICYAUTHVALUE_serialize (const TPMS_POLICYAUTHVALUE *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_POLICYBRANCH_serialize (const TPMS_POLICYBRANCH *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_POLICYCOMMANDCODE_serialize (const TPMS_POLICYCOMMANDCODE *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_POLICYCOUNTERTIMER_serialize (const TPMS_POLICYCOUNTERTIMER *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_POLICYCPHASH_serialize (const TPMS_POLICYCPHASH *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_POLICYDUPLICATIONSELECT_serialize (const TPMS_POLICYDUPLICATIONSELECT *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_POLICYLOCALITY_serialize (const TPMS_POLICYLOCALITY *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_POLICYNAMEHASH_serialize (const TPMS_POLICYNAMEHASH *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_POLICYNVWRITTEN_serialize (const TPMS_POLICYNVWRITTEN *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_POLICYNV_serialize (const TPMS_POLICYNV *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_POLICYOR_serialize (const TPMS_POLICYOR *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_POLICYPASSWORD_serialize (const TPMS_POLICYPASSWORD *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_POLICYPCR_serialize (const TPMS_POLICYPCR *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_POLICYPHYSICALPRESENCE_serialize (const TPMS_POLICYPHYSICALPRESENCE *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_POLICYSECRET_serialize (const TPMS_POLICYSECRET *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_POLICYSIGNED_serialize (const TPMS_POLICYSIGNED *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_POLICYTEMPLATE_serialize (const TPMS_POLICYTEMPLATE *in, json_object **jso)
TSS2_RC ifapi_json_TPMS_POLICY_serialize (const TPMS_POLICY *in, json_object **jso)
TSS2_RC ifapi_json_TPMT_POLICYELEMENT_serialize (const TPMT_POLICYELEMENT *in, json_object **jso)
TSS2_RC ifapi_json_TPMU_POLICYELEMENT_serialize (const TPMU_POLICYELEMENT *in, UINT32 selector, json_object **jso)
TSS2_RC ifapi_json_IFAPI_CONFIG_serialize (const IFAPI_CONFIG *in, json_object **jso)

Detailed Description
Provides functions for the serialization of FAPI objects to JSON. 

Function Documentation
static TSS2_RC ifapi_json_char_serialize (const char *  in, json_object **  jso)
Serialize a character string to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_RC ifapi_json_FAPI_QUOTE_INFO_serialize (const FAPI_QUOTE_INFO *  in, json_object **  jso)
Serialize value of type FAPI_QUOTE_INFO to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type FAPI_QUOTE_INFO. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_IFAPI_CAP_INFO_serialize (const IFAPI_CAP_INFO *  in, json_object **  jso)
Serialize value of type IFAPI_CAP_INFO to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type IFAPI_INFO. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
ifapi_json_IFAPI_CONFIG_serialize (const IFAPI_CONFIG *  in, json_object **  jso)
Serializes a configuration JSON object.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type IFAPI_KEY. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_IFAPI_DUPLICATE_serialize (const IFAPI_DUPLICATE *  in, json_object **  jso)
Serialize value of type IFAPI_DUPLICATE to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type IFAPI_DUPLICATE. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_IFAPI_EVENT_serialize (const IFAPI_EVENT *  in, json_object **  jso)
Serialize value of type IFAPI_EVENT to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type IFAPI_EVENT. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_IFAPI_EVENT_TYPE_serialize (const IFAPI_EVENT_TYPE  in, json_object **  jso)
Serialize IFAPI_EVENT_TYPE to json.
Parameters:
in	in 	constant to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the constant is not of type IFAPI_EVENT_TYPE. 	
TSS2_RC ifapi_json_IFAPI_EVENT_TYPE_serialize_txt (const IFAPI_EVENT_TYPE  in, json_object **  str_jso)
Get json object for a constant, if a variable is actually of type IFAPI_EVENT_TYPE.
Parameters:
in	in 	binary value of constant. 	
out	str_jso 	object with text representing the constant. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the constant is not of type IFAPI_EVENT_TYPE. 	
TSS2_RC ifapi_json_IFAPI_EVENT_UNION_serialize (const IFAPI_EVENT_UNION *  in, UINT32  selector, json_object **  jso)
Serialize a IFAPI_EVENT_UNION to json.
This function expects the Bitfield to be encoded as unsigned int in host-endianess. 
Parameters:
in	in 	the value to be serialized. 	
in	selector 	the type of the event. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type IFAPI_EVENT_UNION. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_IFAPI_EXT_PUB_KEY_serialize (const IFAPI_EXT_PUB_KEY *  in, json_object **  jso)
Serialize value of type IFAPI_EXT_PUB_KEY to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type IFAPI_EXT_PUB_KEY. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_IFAPI_HIERARCHY_serialize (const IFAPI_HIERARCHY *  in, json_object **  jso)
Serialize value of type IFAPI_NV to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type IFAPI_NV. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_IFAPI_IMA_EVENT_serialize (const IFAPI_IMA_EVENT *  in, json_object **  jso)
Serialize value of type IFAPI_IMA_EVENT to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type IFAPI_IMA_EVENT. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_IFAPI_INFO_serialize (const IFAPI_INFO *  in, json_object **  jso)
Serialize value of type IFAPI_INFO to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type IFAPI_INFO. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_IFAPI_KEY_serialize (const IFAPI_KEY *  in, json_object **  jso)
Serialize value of type IFAPI_KEY to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type IFAPI_KEY. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_IFAPI_NV_serialize (const IFAPI_NV *  in, json_object **  jso)
Serialize value of type IFAPI_NV to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type IFAPI_NV. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_IFAPI_OBJECT_serialize (const IFAPI_OBJECT *  in, json_object **  jso)
Serialize a IFAPI_OBJECT to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type IFAPI_OBJECT. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_IFAPI_OBJECT_TYPE_CONSTANT_serialize (const IFAPI_OBJECT_TYPE_CONSTANT  in, json_object **  jso)
Serialize value of type IFAPI_OBJECT_TYPE_CONSTANT to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPM2_HANDLE. 	
TSS2_RC ifapi_json_IFAPI_TSS_EVENT_serialize (const IFAPI_TSS_EVENT *  in, json_object **  jso)
Serialize value of type IFAPI_TSS_EVENT to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type IFAPI_TSS_EVENT. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_INT32_serialize (const INT32  in, json_object **  jso)
Serialize a base_type INT32 to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type INT32. 	
TSS2_RC ifapi_json_pcr_select_serialize (const UINT8  sizeofSelect, const BYTE  pcrSelect[], json_object **  jso)
Serialize a pcr selection to json
Parameters:
in	sizeofSelect 	size of selection byte array. 	
in	pcrSelect 	selection array. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if sizeofSelect is too big. 	
TSS2_RC ifapi_json_TPM2_ALG_ID_serialize (const TPM2_ALG_ID  in, json_object **  jso)
Serialize TPM2_ALG_ID to json.
Parameters:
in	in 	constant to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the constant is not of type TPM2_ALG_ID. 	
TSS2_RC ifapi_json_TPM2_CAP_serialize (const TPM2_CAP  in, json_object **  jso)
Serialize TPM2_CAP to json.
Parameters:
in	in 	constant to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the constant is not of type TPM2_CAP. 	
TSS2_RC ifapi_json_TPM2_CC_serialize (const TPM2_CC  in, json_object **  jso)
Serialize TPM2_CC to json.
Parameters:
in	in 	constant to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the constant is not of type TPM2_CC. 	
TSS2_RC ifapi_json_TPM2_ECC_CURVE_serialize (const TPM2_ECC_CURVE  in, json_object **  jso)
Serialize TPM2_ECC_CURVE to json.
Parameters:
in	in 	constant to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the constant is not of type TPM2_ECC_CURVE. 	
TSS2_RC ifapi_json_TPM2_EO_serialize (const TPM2_EO  in, json_object **  jso)
Serialize TPM2_EO to json.
Parameters:
in	in 	constant to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the constant is not of type TPM2_EO. 	
TSS2_RC ifapi_json_TPM2_GENERATED_serialize (const TPM2_GENERATED  in, json_object **  jso)
Serialize TPM2_GENERATED to json.
Parameters:
in	in 	constant to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the constant is not of type TPM2_GENERATED. 	
TSS2_RC ifapi_json_TPM2_HANDLE_serialize (const TPM2_HANDLE  in, json_object **  jso)
Serialize value of type TPM2_HANDLE to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPM2_HANDLE. 	
TSS2_RC ifapi_json_TPM2_NT_serialize (const TPM2_NT  in, json_object **  jso)
Serialize TPM2_NT to json.
Parameters:
in	in 	constant to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the constant is not of type TPM2_NT. 	
TSS2_RC ifapi_json_TPM2_PT_PCR_serialize (const TPM2_PT_PCR  in, json_object **  jso)
Serialize TPM2_PT_PCR to json.
Parameters:
in	in 	constant to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the constant is not of type TPM2_PT_PCR. 	
TSS2_RC ifapi_json_TPM2_PT_serialize (const TPM2_PT  in, json_object **  jso)
Serialize TPM2_PT to json.
Parameters:
in	in 	constant to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the constant is not of type TPM2_PT. 	
TSS2_RC ifapi_json_TPM2_ST_serialize (const TPM2_ST  in, json_object **  jso)
Serialize TPM2_ST to json.
Parameters:
in	in 	constant to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the constant is not of type TPM2_ST. 	
TSS2_RC ifapi_json_TPM2B_CREATION_DATA_serialize (const TPM2B_CREATION_DATA *  in, json_object **  jso)
Serialize a TPM2B_CREATION_DATA to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPM2B_CREATION_DATA. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPM2B_DATA_serialize (const TPM2B_DATA *  in, json_object **  jso)
Serialize value of type TPM2B_DATA to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPM2B_DATA. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPM2B_DIGEST_serialize (const TPM2B_DIGEST *  in, json_object **  jso)
Serialize value of type TPM2B_DIGEST to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPM2B_DIGEST. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPM2B_ECC_PARAMETER_serialize (const TPM2B_ECC_PARAMETER *  in, json_object **  jso)
Serialize value of type TPM2B_ECC_PARAMETER to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPM2B_ECC_PARAMETER. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPM2B_ENCRYPTED_SECRET_serialize (const TPM2B_ENCRYPTED_SECRET *  in, json_object **  jso)
Serialize value of type TPM2B_ENCRYPTED_SECRET to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPM2B_ENCRYPTED_SECRET. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPM2B_EVENT_serialize (const TPM2B_EVENT *  in, json_object **  jso)
Serialize value of type TPM2B_EVENT to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPM2B_EVENT. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPM2B_MAX_NV_BUFFER_serialize (const TPM2B_MAX_NV_BUFFER *  in, json_object **  jso)
Serialize value of type TPM2B_MAX_NV_BUFFER to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPM2B_MAX_NV_BUFFER. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPM2B_NAME_serialize (const TPM2B_NAME *  in, json_object **  jso)
Serialize value of type TPM2B_NAME to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPM2B_NAME. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPM2B_NONCE_serialize (const TPM2B_NONCE *  in, json_object **  jso)
Serialize a TPM2B_NONCE to json.
Parameters:
in	in 	value of type TPM2B_NONCE to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPM2B_NONCE. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPM2B_NV_PUBLIC_serialize (const TPM2B_NV_PUBLIC *  in, json_object **  jso)
Serialize a TPM2B_NV_PUBLIC to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPM2B_NV_PUBLIC. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPM2B_OPERAND_serialize (const TPM2B_OPERAND *  in, json_object **  jso)
Serialize a TPM2B_OPERAND to json.
Parameters:
in	in 	value of type TPM2B_OPERAND to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPM2B_OPERAND. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPM2B_PRIVATE_serialize (const TPM2B_PRIVATE *  in, json_object **  jso)
Serialize value of type TPM2B_PRIVATE to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPM2B_PRIVATE. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPM2B_PUBLIC_KEY_RSA_serialize (const TPM2B_PUBLIC_KEY_RSA *  in, json_object **  jso)
Serialize value of type TPM2B_PUBLIC_KEY_RSA to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPM2B_PUBLIC_KEY_RSA. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPM2B_PUBLIC_serialize (const TPM2B_PUBLIC *  in, json_object **  jso)
Serialize a TPM2B_PUBLIC to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPM2B_PUBLIC. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMA_ALGORITHM_serialize (const TPMA_ALGORITHM  in, json_object **  jso)
Serialize a TPMA_ALGORITHM to json.
This function expects the Bitfield to be encoded as unsigned int in host-endianess.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the constant is not of type TPMA_ALGORITHM. 	
TSS2_RC ifapi_json_TPMA_CC_serialize (const TPMA_CC  in, json_object **  jso)
Serialize a TPMA_CC to json.
This function expects the Bitfield to be encoded as unsigned int in host-endianess.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the constant is not of type TPMA_CC. 	
TSS2_RC ifapi_json_TPMA_LOCALITY_serialize (const TPMA_LOCALITY  in, json_object **  jso)
Serialize a TPMA_LOCALITY to json.
This function expects the Bitfield to be encoded as unsigned int in host-endianess.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the constant is not of type TPMA_LOCALITY. 	
TSS2_RC ifapi_json_TPMA_NV_serialize (const TPMA_NV  in, json_object **  jso)
Serialize a TPMA_NV to json.
This function expects the Bitfield to be encoded as unsigned int in host-endianess.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the constant is not of type TPMA_NV. 	
TSS2_RC ifapi_json_TPMA_OBJECT_serialize (const TPMA_OBJECT  in, json_object **  jso)
Serialize a TPMA_OBJECT to json.
This function expects the Bitfield to be encoded as unsigned int in host-endianess.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the constant is not of type TPMA_OBJECT. 	
TSS2_RC ifapi_json_TPMI_AES_KEY_BITS_serialize (const TPMI_AES_KEY_BITS  in, json_object **  jso)
Serialize value of type TPMI_AES_KEY_BITS to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMI_AES_KEY_BITS.	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMI_ALG_ASYM_SCHEME_serialize (const TPMI_ALG_ASYM_SCHEME  in, json_object **  jso)
Serialize TPMI_ALG_ASYM_SCHEME to json.
Parameters:
in	in 	variable to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_TPMI_ALG_CIPHER_MODE_serialize (const TPMI_ALG_CIPHER_MODE  in, json_object **  jso)
Serialize TPMI_ALG_CIPHER_MODE to json.
Parameters:
in	in 	variable to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_TPMI_ALG_ECC_SCHEME_serialize (const TPMI_ALG_ECC_SCHEME  in, json_object **  jso)
Serialize TPMI_ALG_ECC_SCHEME to json.
Parameters:
in	in 	variable to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_TPMI_ALG_HASH_serialize (const TPMI_ALG_HASH  in, json_object **  jso)
Serialize TPMI_ALG_HASH to json.
Parameters:
in	in 	variable to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_TPMI_ALG_KDF_serialize (const TPMI_ALG_KDF  in, json_object **  jso)
Serialize TPMI_ALG_KDF to json.
Parameters:
in	in 	variable to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_TPMI_ALG_KEYEDHASH_SCHEME_serialize (const TPMI_ALG_KEYEDHASH_SCHEME  in, json_object **  jso)
Serialize TPMI_ALG_KEYEDHASH_SCHEME to json.
Parameters:
in	in 	variable to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_TPMI_ALG_PUBLIC_serialize (const TPMI_ALG_PUBLIC  in, json_object **  jso)
Serialize TPMI_ALG_PUBLIC to json.
Parameters:
in	in 	variable to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_TPMI_ALG_RSA_SCHEME_serialize (const TPMI_ALG_RSA_SCHEME  in, json_object **  jso)
Serialize TPMI_ALG_RSA_SCHEME to json.
Parameters:
in	in 	variable to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_TPMI_ALG_SIG_SCHEME_serialize (const TPMI_ALG_SIG_SCHEME  in, json_object **  jso)
Serialize TPMI_ALG_SIG_SCHEME to json.
Parameters:
in	in 	variable to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_TPMI_ALG_SYM_MODE_serialize (const TPMI_ALG_SYM_MODE  in, json_object **  jso)
Serialize TPMI_ALG_SYM_MODE to json.
Parameters:
in	in 	variable to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_TPMI_ALG_SYM_OBJECT_serialize (const TPMI_ALG_SYM_OBJECT  in, json_object **  jso)
Serialize TPMI_ALG_SYM_OBJECT to json.
Parameters:
in	in 	variable to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_TPMI_ECC_CURVE_serialize (const TPMI_ECC_CURVE  in, json_object **  jso)
Serialize value of type TPMI_ECC_CURVE to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMI_ECC_CURVE. 	
TSS2_RC ifapi_json_TPMI_POLICYTYPE_serialize (const TPMI_POLICYTYPE  in, json_object **  jso)
Serialize TPMI_POLICYTYPE to json.
Parameters:
in	in 	constant to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the constant is not of type TPMI_POLICYTYPE. 	
TSS2_RC ifapi_json_TPMI_POLICYTYPE_serialize_txt (const TPMI_POLICYTYPE  in, json_object **  str_jso)
Get json object for a constant, if a variable is actually of type TPMI_POLICYTYPE.
Parameters:
in	in 	binary value of constant. 	
out	str_jso 	with text representing the constant. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the constant is not of type TPMI_POLICYTYPE. 	
TSS2_RC ifapi_json_TPMI_RH_HIERARCHY_serialize (const TPMI_RH_HIERARCHY  in, json_object **  jso)
Serialize TPMI_RH_HIERARCHY to json.
Parameters:
in	in 	variable to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_TPMI_RH_NV_INDEX_serialize (const TPMI_RH_NV_INDEX  in, json_object **  jso)
Serialize value of type TPMI_RH_NV_INDEX to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMI_RH_NV_INDEX. 	
TSS2_RC ifapi_json_TPMI_RSA_KEY_BITS_serialize (const TPMI_RSA_KEY_BITS  in, json_object **  jso)
Serialize value of type TPMI_RSA_KEY_BITS to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMI_RSA_KEY_BITS. 	
TSS2_RC ifapi_json_TPMI_ST_ATTEST_serialize (const TPMI_ST_ATTEST  in, json_object **  jso)
Serialize TPMI_ST_ATTEST to json.
Parameters:
in	in 	variable to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_TPMI_YES_NO_serialize (const TPMI_YES_NO  in, json_object **  jso)
Serialize TPMI_YES_NO to json.
Parameters:
in	in 	variable to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_TPML_ALG_PROPERTY_serialize (const TPML_ALG_PROPERTY *  in, json_object **  jso)
Serialize value of type TPML_ALG_PROPERTY to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPML_ALG_PROPERTY. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPML_CC_serialize (const TPML_CC *  in, json_object **  jso)
Serialize value of type TPML_CC to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPML_CC. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPML_CCA_serialize (const TPML_CCA *  in, json_object **  jso)
Serialize value of type TPML_CCA to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPML_CCA. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPML_DIGEST_VALUES_serialize (const TPML_DIGEST_VALUES *  in, json_object **  jso)
Serialize value of type TPML_DIGEST_VALUES to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPML_DIGEST_VALUES. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPML_ECC_CURVE_serialize (const TPML_ECC_CURVE *  in, json_object **  jso)
Serialize value of type TPML_ECC_CURVE to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPML_ECC_CURVE. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPML_HANDLE_serialize (const TPML_HANDLE *  in, json_object **  jso)
Serialize value of type TPML_HANDLE to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPML_HANDLE. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPML_PCR_SELECTION_serialize (const TPML_PCR_SELECTION *  in, json_object **  jso)
Serialize value of type TPML_PCR_SELECTION to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPML_PCR_SELECTION. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPML_PCRVALUES_serialize (const TPML_PCRVALUES *  in, json_object **  jso)
Serialize value of type TPML_PCRVALUES to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPML_PCRVALUES. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPML_POLICYBRANCHES_serialize (const TPML_POLICYBRANCHES *  in, json_object **  jso)
Serialize value of type TPML_POLICYBRANCHES to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPML_POLICYBRANCHES. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPML_POLICYELEMENTS_serialize (const TPML_POLICYELEMENTS *  in, json_object **  jso)
Serialize value of type TPML_POLICYELEMENTS to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPML_POLICYELEMENTS. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPML_TAGGED_PCR_PROPERTY_serialize (const TPML_TAGGED_PCR_PROPERTY *  in, json_object **  jso)
Serialize value of type TPML_TAGGED_PCR_PROPERTY to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPML_TAGGED_PCR_PROPERTY. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPML_TAGGED_TPM_PROPERTY_serialize (const TPML_TAGGED_TPM_PROPERTY *  in, json_object **  jso)
Serialize value of type TPML_TAGGED_TPM_PROPERTY to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPML_TAGGED_TPM_PROPERTY. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_ALG_PROPERTY_serialize (const TPMS_ALG_PROPERTY *  in, json_object **  jso)
Serialize value of type TPMS_ALG_PROPERTY to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_ALG_PROPERTY. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_ATTEST_serialize (const TPMS_ATTEST *  in, json_object **  jso)
Serialize value of type TPMS_ATTEST to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_ATTEST. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_CAPABILITY_DATA_serialize (const TPMS_CAPABILITY_DATA *  in, json_object **  jso)
Serialize value of type TPMS_CAPABILITY_DATA to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_CAPABILITY_DATA. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_CERTIFY_INFO_serialize (const TPMS_CERTIFY_INFO *  in, json_object **  jso)
Serialize value of type TPMS_CERTIFY_INFO to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_CERTIFY_INFO. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_CLOCK_INFO_serialize (const TPMS_CLOCK_INFO *  in, json_object **  jso)
Serialize value of type TPMS_CLOCK_INFO to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_CLOCK_INFO. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_COMMAND_AUDIT_INFO_serialize (const TPMS_COMMAND_AUDIT_INFO *  in, json_object **  jso)
Serialize value of type TPMS_COMMAND_AUDIT_INFO to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_COMMAND_AUDIT_INFO. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_CREATION_DATA_serialize (const TPMS_CREATION_DATA *  in, json_object **  jso)
Serialize value of type TPMS_CREATION_DATA to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_CREATION_DATA. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_CREATION_INFO_serialize (const TPMS_CREATION_INFO *  in, json_object **  jso)
Serialize value of type TPMS_CREATION_INFO to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_CREATION_INFO. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_ECC_PARMS_serialize (const TPMS_ECC_PARMS *  in, json_object **  jso)
Serialize value of type TPMS_ECC_PARMS to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_ECC_PARMS. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_ECC_POINT_serialize (const TPMS_ECC_POINT *  in, json_object **  jso)
Serialize value of type TPMS_ECC_POINT to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_ECC_POINT. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_EMPTY_serialize (const TPMS_EMPTY *  in, json_object **  jso)
Serialize a TPMS_EMPTY.
Parameters:
in	in 	not used. 	
in	jso 	not used. 	
Return values:
TSS2_RC_SUCCESS 	is always returnde. 	
TSS2_RC ifapi_json_TPMS_ENC_SCHEME_OAEP_serialize (const TPMS_ENC_SCHEME_OAEP *  in, json_object **  jso)
Serialize a TPMS_ENC_SCHEME_OAEP to json.
Parameters:
in	in 	value of type TPMS_ENC_SCHEME_OAEP to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_ENC_SCHEME_OAEP. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_ENC_SCHEME_RSAES_serialize (const TPMS_ENC_SCHEME_RSAES *  in, json_object **  jso)
Serialize a TPMS_ENC_SCHEME_RSAES to json.
Parameters:
in	in 	value of type TPMS_ENC_SCHEME_RSAES to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_ENC_SCHEME_RSAES. 	
TSS2_RC ifapi_json_TPMS_KEY_SCHEME_ECDH_serialize (const TPMS_KEY_SCHEME_ECDH *  in, json_object **  jso)
Serialize a TPMS_KEY_SCHEME_ECDH to json.
Parameters:
in	in 	value of type TPMS_KEY_SCHEME_ECDH to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_KEY_SCHEME_ECDH. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_KEYEDHASH_PARMS_serialize (const TPMS_KEYEDHASH_PARMS *  in, json_object **  jso)
Serialize value of type TPMS_KEYEDHASH_PARMS to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_KEYEDHASH_PARMS. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_NV_CERTIFY_INFO_serialize (const TPMS_NV_CERTIFY_INFO *  in, json_object **  jso)
Serialize value of type TPMS_NV_CERTIFY_INFO to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_NV_CERTIFY_INFO. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_NV_PUBLIC_serialize (const TPMS_NV_PUBLIC *  in, json_object **  jso)
Serialize value of type TPMS_NV_PUBLIC to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_NV_PUBLIC. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_PCR_SELECT_serialize (const TPMS_PCR_SELECT *  in, json_object **  jso)
Serialize a TPMS_PCR_SELECT structure to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_PCR_SELECTION. 	
TSS2_RC ifapi_json_TPMS_PCR_SELECTION_serialize (const TPMS_PCR_SELECTION *  in, json_object **  jso)
Serialize a TPMS_PCR_SELECTION structure to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_PCR_SELECTION. 	
TSS2_RC ifapi_json_TPMS_PCRVALUE_serialize (const TPMS_PCRVALUE *  in, json_object **  jso)
Serialize value of type TPMS_PCRVALUE to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_PCRVALUE. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_POLICY_serialize (const TPMS_POLICY *  in, json_object **  jso)
Serialize value of type TPMS_POLICY to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_POLICY. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_POLICYACTION_serialize (const TPMS_POLICYACTION *  in, json_object **  jso)
Serialize value of type TPMS_POLICYACTION to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_POLICYACTION. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_POLICYAUTHORIZATION_serialize (const TPMS_POLICYAUTHORIZATION *  in, json_object **  jso)
Serialize value of type TPMS_POLICYAUTHORIZATION to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_POLICYAUTHORIZATION. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_POLICYAUTHORIZE_serialize (const TPMS_POLICYAUTHORIZE *  in, json_object **  jso)
Serialize value of type TPMS_POLICYAUTHORIZE to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_POLICYAUTHORIZE. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
< counter for conditional fields 
TSS2_RC ifapi_json_TPMS_POLICYAUTHORIZENV_serialize (const TPMS_POLICYAUTHORIZENV *  in, json_object **  jso)
Serialize value of type TPMS_POLICYAUTHORIZENV to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_POLICYAUTHORIZENV. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
< counter for conditional fields 
TSS2_RC ifapi_json_TPMS_POLICYAUTHVALUE_serialize (const TPMS_POLICYAUTHVALUE *  in, json_object **  jso)
Serialize value of type TPMS_POLICYAUTHVALUE to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_POLICYAUTHVALUE. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_POLICYBRANCH_serialize (const TPMS_POLICYBRANCH *  in, json_object **  jso)
Serialize value of type TPMS_POLICYBRANCH to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_POLICYBRANCH. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_POLICYCOMMANDCODE_serialize (const TPMS_POLICYCOMMANDCODE *  in, json_object **  jso)
Serialize value of type TPMS_POLICYCOMMANDCODE to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_POLICYCOMMANDCODE. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_POLICYCOUNTERTIMER_serialize (const TPMS_POLICYCOUNTERTIMER *  in, json_object **  jso)
Serialize value of type TPMS_POLICYCOUNTERTIMER to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_POLICYCOUNTERTIMER. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_POLICYCPHASH_serialize (const TPMS_POLICYCPHASH *  in, json_object **  jso)
Serialize value of type TPMS_POLICYCPHASH to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_POLICYCPHASH. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_POLICYDUPLICATIONSELECT_serialize (const TPMS_POLICYDUPLICATIONSELECT *  in, json_object **  jso)
Serialize value of type TPMS_POLICYDUPLICATIONSELECT to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_POLICYDUPLICATIONSELECT. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
< counter for conditional fields 
TSS2_RC ifapi_json_TPMS_POLICYLOCALITY_serialize (const TPMS_POLICYLOCALITY *  in, json_object **  jso)
Serialize value of type TPMS_POLICYLOCALITY to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_POLICYLOCALITY. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_POLICYNAMEHASH_serialize (const TPMS_POLICYNAMEHASH *  in, json_object **  jso)
Serialize value of type TPMS_POLICYNAMEHASH to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_POLICYNAMEHASH. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
< counter for conditional fields 
TSS2_RC ifapi_json_TPMS_POLICYNV_serialize (const TPMS_POLICYNV *  in, json_object **  jso)
Serialize value of type TPMS_POLICYNV to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_POLICYNV. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
< counter for conditional fields 
TSS2_RC ifapi_json_TPMS_POLICYNVWRITTEN_serialize (const TPMS_POLICYNVWRITTEN *  in, json_object **  jso)
Serialize value of type TPMS_POLICYNVWRITTEN to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_POLICYNVWRITTEN. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_POLICYOR_serialize (const TPMS_POLICYOR *  in, json_object **  jso)
Serialize value of type TPMS_POLICYOR to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_POLICYOR. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_POLICYPASSWORD_serialize (const TPMS_POLICYPASSWORD *  in, json_object **  jso)
Serialize value of type TPMS_POLICYPASSWORD to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_POLICYPASSWORD. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_POLICYPCR_serialize (const TPMS_POLICYPCR *  in, json_object **  jso)
Serialize value of type TPMS_POLICYPCR to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_POLICYPCR. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
< counter for conditional fields 
TSS2_RC ifapi_json_TPMS_POLICYPHYSICALPRESENCE_serialize (const TPMS_POLICYPHYSICALPRESENCE *  in, json_object **  jso)
Serialize value of type TPMS_POLICYPHYSICALPRESENCE to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_POLICYPHYSICALPRESENCE. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_POLICYSECRET_serialize (const TPMS_POLICYSECRET *  in, json_object **  jso)
Serialize value of type TPMS_POLICYSECRET to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_POLICYSECRET. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
< counter for conditional fields 
TSS2_RC ifapi_json_TPMS_POLICYSIGNED_serialize (const TPMS_POLICYSIGNED *  in, json_object **  jso)
Serialize value of type TPMS_POLICYSIGNED to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_POLICYSIGNED. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
< counter for conditional fields 
TSS2_RC ifapi_json_TPMS_POLICYTEMPLATE_serialize (const TPMS_POLICYTEMPLATE *  in, json_object **  jso)
Serialize value of type TPMS_POLICYTEMPLATE to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_POLICYTEMPLATE. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
< counter for conditional fields 
TSS2_RC ifapi_json_TPMS_QUOTE_INFO_serialize (const TPMS_QUOTE_INFO *  in, json_object **  jso)
Serialize value of type TPMS_QUOTE_INFO to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_QUOTE_INFO. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_RSA_PARMS_serialize (const TPMS_RSA_PARMS *  in, json_object **  jso)
Serialize value of type TPMS_RSA_PARMS to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_RSA_PARMS. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SCHEME_ECDAA_serialize (const TPMS_SCHEME_ECDAA *  in, json_object **  jso)
Serialize value of type TPMS_SCHEME_ECDAA to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_SCHEME_ECDAA. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SCHEME_HASH_serialize (const TPMS_SCHEME_HASH *  in, json_object **  jso)
Serialize value of type TPMS_SCHEME_HASH to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_SCHEME_HASH. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SCHEME_HMAC_serialize (const TPMS_SCHEME_HMAC *  in, json_object **  jso)
Serialize a TPMS_SCHEME_HMAC to json.
Parameters:
in	in 	value of type TPMS_SCHEME_HMAC to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_SCHEME_HMAC. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SCHEME_KDF1_SP800_108_serialize (const TPMS_SCHEME_KDF1_SP800_108 *  in, json_object **  jso)
Serialize a TPMS_SCHEME_KDF1_SP800_108 to json.
Parameters:
in	in 	value of type TPMS_SCHEME_KDF1_SP800_108 to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_SCHEME_KDF1_SP800_108. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SCHEME_KDF1_SP800_56A_serialize (const TPMS_SCHEME_KDF1_SP800_56A *  in, json_object **  jso)
Serialize a TPMS_SCHEME_KDF1_SP800_56A to json.
Parameters:
in	in 	value of type TPMS_SCHEME_KDF1_SP800_56A to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_SCHEME_KDF1_SP800_56A. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SCHEME_MGF1_serialize (const TPMS_SCHEME_MGF1 *  in, json_object **  jso)
Serialize a TPMS_SCHEME_MGF1 to json.
Parameters:
in	in 	value of type TPMS_SCHEME_MGF1 to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_SCHEME_MGF1. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SCHEME_XOR_serialize (const TPMS_SCHEME_XOR *  in, json_object **  jso)
Serialize value of type TPMS_SCHEME_XOR to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_SCHEME_XOR. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SESSION_AUDIT_INFO_serialize (const TPMS_SESSION_AUDIT_INFO *  in, json_object **  jso)
Serialize value of type TPMS_SESSION_AUDIT_INFO to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_SESSION_AUDIT_INFO. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SIG_SCHEME_ECDAA_serialize (const TPMS_SIG_SCHEME_ECDAA *  in, json_object **  jso)
Serialize a TPMS_SIG_SCHEME_ECDAA to json.
Parameters:
in	in 	value of type TPMS_SIG_SCHEME_ECDAA to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_SIG_SCHEME_ECDAA. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SIG_SCHEME_ECDSA_serialize (const TPMS_SIG_SCHEME_ECDSA *  in, json_object **  jso)
Serialize a TPMS_SIG_SCHEME_ECDSA to json.
Parameters:
in	in 	value of type TPMS_SIG_SCHEME_ECDSA to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_SIG_SCHEME_ECDSA. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SIG_SCHEME_ECSCHNORR_serialize (const TPMS_SIG_SCHEME_ECSCHNORR *  in, json_object **  jso)
Serialize a TPMS_SIG_SCHEME_ECSCHNORR to json.
Parameters:
in	in 	value of type TPMS_SIG_SCHEME_ECSCHNORR to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_SIG_SCHEME_ECSCHNORR. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SIG_SCHEME_RSAPSS_serialize (const TPMS_SIG_SCHEME_RSAPSS *  in, json_object **  jso)
Serialize a TPMS_SIG_SCHEME_RSAPSS to json.
Parameters:
in	in 	value of type TPMS_SIG_SCHEME_RSAPSS to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_SIG_SCHEME_RSAPSS. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SIG_SCHEME_RSASSA_serialize (const TPMS_SIG_SCHEME_RSASSA *  in, json_object **  jso)
Serialize a TPMS_SIG_SCHEME_RSASSA to json.
Parameters:
in	in 	value of type TPMS_SIG_SCHEME_RSASSA to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_SIG_SCHEME_RSASSA. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SIG_SCHEME_SM2_serialize (const TPMS_SIG_SCHEME_SM2 *  in, json_object **  jso)
Serialize a TPMS_SIG_SCHEME_SM2 to json.
Parameters:
in	in 	value of type TPMS_SIG_SCHEME_SM2 to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_SIG_SCHEME_SM2. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SIGNATURE_ECC_serialize (const TPMS_SIGNATURE_ECC *  in, json_object **  jso)
Serialize value of type TPMS_SIGNATURE_ECC to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_SIGNATURE_ECC. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SIGNATURE_ECDAA_serialize (const TPMS_SIGNATURE_ECDAA *  in, json_object **  jso)
Serialize a TPMS_SIGNATURE_ECDAA to json.
Parameters:
in	in 	value of type TPMS_SIGNATURE_ECDAA to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_SIGNATURE_ECDAA. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SIGNATURE_ECDSA_serialize (const TPMS_SIGNATURE_ECDSA *  in, json_object **  jso)
Serialize a TPMS_SIGNATURE_ECDSA to json.
Parameters:
in	in 	value of type TPMS_SIGNATURE_ECDSA to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_SIGNATURE_ECDSA. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SIGNATURE_ECSCHNORR_serialize (const TPMS_SIGNATURE_ECSCHNORR *  in, json_object **  jso)
Serialize a TPMS_SIGNATURE_ECSCHNORR to json.
Parameters:
in	in 	value of type TPMS_SIGNATURE_ECSCHNORR to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_SIGNATURE_ECSCHNORR. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SIGNATURE_RSA_serialize (const TPMS_SIGNATURE_RSA *  in, json_object **  jso)
Serialize value of type TPMS_SIGNATURE_RSA to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_SIGNATURE_RSA. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SIGNATURE_RSAPSS_serialize (const TPMS_SIGNATURE_RSAPSS *  in, json_object **  jso)
Serialize a TPMS_SIGNATURE_RSAPSS to json.
Parameters:
in	in 	value of type TPMS_SIGNATURE_RSAPSS to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_SIGNATURE_RSAPSS. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SIGNATURE_RSASSA_serialize (const TPMS_SIGNATURE_RSASSA *  in, json_object **  jso)
Serialize a TPMS_SIGNATURE_RSASSA to json.
Parameters:
in	in 	value of type TPMS_SIGNATURE_RSASSA to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_SIGNATURE_RSASSA. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SIGNATURE_SM2_serialize (const TPMS_SIGNATURE_SM2 *  in, json_object **  jso)
Serialize a TPMS_SIGNATURE_SM2 to json.
Parameters:
in	in 	value of type TPMS_SIGNATURE_SM2 to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_SIGNATURE_SM2. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SYMCIPHER_PARMS_serialize (const TPMS_SYMCIPHER_PARMS *  in, json_object **  jso)
Serialize value of type TPMS_SYMCIPHER_PARMS to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_SYMCIPHER_PARMS. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_TAGGED_PCR_SELECT_serialize (const TPMS_TAGGED_PCR_SELECT *  in, json_object **  jso)
Serialize a TPMS_TAGGED_PCR_SELECT structure to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_TAGGED_PCR_SELECT. 	
TSS2_RC ifapi_json_TPMS_TAGGED_PROPERTY_serialize (const TPMS_TAGGED_PROPERTY *  in, json_object **  jso)
Serialize value of type TPMS_TAGGED_PROPERTY to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_TAGGED_PROPERTY. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_TIME_ATTEST_INFO_serialize (const TPMS_TIME_ATTEST_INFO *  in, json_object **  jso)
Serialize value of type TPMS_TIME_ATTEST_INFO to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_TIME_ATTEST_INFO. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_TIME_INFO_serialize (const TPMS_TIME_INFO *  in, json_object **  jso)
Serialize value of type TPMS_TIME_INFO to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMS_TIME_INFO. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMT_ECC_SCHEME_serialize (const TPMT_ECC_SCHEME *  in, json_object **  jso)
Serialize value of type TPMT_ECC_SCHEME to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMT_ECC_SCHEME. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMT_HA_serialize (const TPMT_HA *  in, json_object **  jso)
Serialize value of type TPMT_HA to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMT_HA. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMT_KDF_SCHEME_serialize (const TPMT_KDF_SCHEME *  in, json_object **  jso)
Serialize value of type TPMT_KDF_SCHEME to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMT_KDF_SCHEME. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMT_KEYEDHASH_SCHEME_serialize (const TPMT_KEYEDHASH_SCHEME *  in, json_object **  jso)
Serialize value of type TPMT_KEYEDHASH_SCHEME to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMT_KEYEDHASH_SCHEME. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMT_POLICYELEMENT_serialize (const TPMT_POLICYELEMENT *  in, json_object **  jso)
Serialize value of type TPMT_POLICYELEMENT to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMT_POLICYELEMENT. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMT_PUBLIC_serialize (const TPMT_PUBLIC *  in, json_object **  jso)
Serialize value of type TPMT_PUBLIC to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMT_PUBLIC. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMT_RSA_SCHEME_serialize (const TPMT_RSA_SCHEME *  in, json_object **  jso)
Serialize value of type TPMT_RSA_SCHEME to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMT_RSA_SCHEME. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMT_SIG_SCHEME_serialize (const TPMT_SIG_SCHEME *  in, json_object **  jso)
Serialize value of type TPMT_SIG_SCHEME to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMT_SIG_SCHEME. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMT_SIGNATURE_serialize (const TPMT_SIGNATURE *  in, json_object **  jso)
Serialize value of type TPMT_SIGNATURE to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMT_SIGNATURE. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMT_SYM_DEF_OBJECT_serialize (const TPMT_SYM_DEF_OBJECT *  in, json_object **  jso)
Serialize value of type TPMT_SYM_DEF_OBJECT to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMT_SYM_DEF_OBJECT. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMT_TK_CREATION_serialize (const TPMT_TK_CREATION *  in, json_object **  jso)
Serialize value of type TPMT_TK_CREATION to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMT_TK_CREATION. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMU_ASYM_SCHEME_serialize (const TPMU_ASYM_SCHEME *  in, UINT32  selector, json_object **  jso)
Serialize a TPMU_ASYM_SCHEME to json.
This function expects the Bitfield to be encoded as unsigned int in host-endianess. 
Parameters:
in	in 	the value to be serialized. 	
in	selector 	the type of the scheme. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMU_ASYM_SCHEME. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMU_ATTEST_serialize (const TPMU_ATTEST *  in, UINT32  selector, json_object **  jso)
Serialize a TPMU_ATTEST to json.
This function expects the Bitfield to be encoded as unsigned int in host-endianess. 
Parameters:
in	in 	the value to be serialized. 	
in	selector 	the type of the attest. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMU_ATTEST. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMU_CAPABILITIES_serialize (const TPMU_CAPABILITIES *  in, UINT32  selector, json_object **  jso)
Serialize a TPMU_CAPABILITIES to json.
This function expects the Bitfield to be encoded as unsigned int in host-endianess. 
Parameters:
in	in 	the value to be serialized. 	
in	selector 	the type of the capabilities. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMU_CAPABILITIES. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMU_HA_serialize (const TPMU_HA *  in, UINT32  selector, json_object **  jso)
Serialize a TPMU_HA to json.
This function expects the Bitfield to be encoded as unsigned int in host-endianess. 
Parameters:
in	in 	the value to be serialized. 	
in	selector 	the type of the HA object. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMU_HA. 	
TSS2_RC ifapi_json_TPMU_KDF_SCHEME_serialize (const TPMU_KDF_SCHEME *  in, UINT32  selector, json_object **  jso)
Serialize a TPMU_KDF_SCHEME to json.
This function expects the Bitfield to be encoded as unsigned int in host-endianess. 
Parameters:
in	in 	the value to be serialized. 	
in	selector 	the type of the KDF scheme. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMU_KDF_SCHEME. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMU_POLICYELEMENT_serialize (const TPMU_POLICYELEMENT *  in, UINT32  selector, json_object **  jso)
Serialize a TPMU_POLICYELEMENT to json.
This function expects the Bitfield to be encoded as unsigned int in host-endianess. 
Parameters:
in	in 	the value to be serialized. 	
in	selector 	the type of the policy element. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMU_POLICYELEMENT. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMU_PUBLIC_ID_serialize (const TPMU_PUBLIC_ID *  in, UINT32  selector, json_object **  jso)
Serialize a TPMU_PUBLIC_ID to json.
This function expects the Bitfield to be encoded as unsigned int in host-endianess. 
Parameters:
in	in 	the value to be serialized. 	
in	selector 	the type of the public ID. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMU_PUBLIC_ID. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMU_PUBLIC_PARMS_serialize (const TPMU_PUBLIC_PARMS *  in, UINT32  selector, json_object **  jso)
Serialize a TPMU_PUBLIC_PARMS to json.
This function expects the Bitfield to be encoded as unsigned int in host-endianess. 
Parameters:
in	in 	the value to be serialized. 	
in	selector 	the type of the public parameters. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMU_PUBLIC_PARMS. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMU_SCHEME_KEYEDHASH_serialize (const TPMU_SCHEME_KEYEDHASH *  in, UINT32  selector, json_object **  jso)
Serialize a TPMU_SCHEME_KEYEDHASH to json.
This function expects the Bitfield to be encoded as unsigned int in host-endianess. 
Parameters:
in	in 	the value to be serialized. 	
in	selector 	the type of the keyedhash scheme. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMU_SCHEME_KEYEDHASH. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMU_SIG_SCHEME_serialize (const TPMU_SIG_SCHEME *  in, UINT32  selector, json_object **  jso)
Serialize a TPMU_SIG_SCHEME to json.
This function expects the Bitfield to be encoded as unsigned int in host-endianess. 
Parameters:
in	in 	the value to be serialized. 	
in	selector 	the type of the signature scheme. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMU_SIG_SCHEME. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMU_SIGNATURE_serialize (const TPMU_SIGNATURE *  in, UINT32  selector, json_object **  jso)
Serialize a TPMU_SIGNATURE to json.
This function expects the Bitfield to be encoded as unsigned int in host-endianess. 
Parameters:
in	in 	the value to be serialized. 	
in	selector 	the type of the signature. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMU_SIGNATURE. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMU_SYM_KEY_BITS_serialize (const TPMU_SYM_KEY_BITS *  in, UINT32  selector, json_object **  jso)
Serialize a TPMU_SYM_KEY_BITS to json.
This function expects the Bitfield to be encoded as unsigned int in host-endianess. 
Parameters:
in	in 	the value to be serialized. 	
in	selector 	the type of the symmetric algorithm. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMU_SYM_KEY_BITS. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMU_SYM_MODE_serialize (const TPMU_SYM_MODE *  in, UINT32  selector, json_object **  jso)
Serialize a TPMU_SYM_MODE to json.
This function expects the Bitfield to be encoded as unsigned int in host-endianess. 
Parameters:
in	in 	the value to be serialized. 	
in	selector 	the type of the symmetric mode. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPMU_SYM_MODE. 	
TSS2_RC ifapi_json_UINT16_serialize (const UINT16  in, json_object **  jso)
Serialize a base_type UINT16 to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type UINT16. 	
TSS2_RC ifapi_json_UINT32_serialize (const UINT32  in, json_object **  jso)
Serialize a base_type UINT32 to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type UINT32. 	
TSS2_RC ifapi_json_UINT64_serialize (UINT64  in, json_object **  jso)
Serialize a base_type UINT64 to json.
Parameters:
in	in 	variable to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type UINT64. 	
TSS2_RC ifapi_json_UINT8_ARY_serialize (const UINT8_ARY *  in, json_object **  jso)
Serialize value of type UINT8_ARY to json.
Parameters:
in	in 	value to be serialized. 	
out	jso 	pointer to the json object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if the FAPI cannot allocate enough memory. 	
TSS2_FAPI_RC_BAD_VALUE 	if the value is not of type TPM2B_DIGEST. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	

FAPI object deserialization module
Functions
TSS2_RC ifapi_json_FAPI_QUOTE_INFO_deserialize (json_object *jso, FAPI_QUOTE_INFO *out)
TSS2_RC ifapi_json_IFAPI_DUPLICATE_deserialize (json_object *jso, IFAPI_DUPLICATE *out)
TSS2_RC ifapi_json_IFAPI_EVENT_TYPE_deserialize (json_object *jso, IFAPI_EVENT_TYPE *out)
TSS2_RC ifapi_json_IFAPI_EVENT_TYPE_deserialize_txt (json_object *jso, IFAPI_EVENT_TYPE *out)
TSS2_RC ifapi_json_IFAPI_EVENT_UNION_deserialize (UINT32 selector, json_object *jso, IFAPI_EVENT_UNION *out)
TSS2_RC ifapi_json_IFAPI_EVENT_deserialize (json_object *jso, IFAPI_EVENT *out)
TSS2_RC ifapi_json_IFAPI_EXT_PUB_KEY_deserialize (json_object *jso, IFAPI_EXT_PUB_KEY *out)
TSS2_RC ifapi_json_IFAPI_HIERARCHY_deserialize (json_object *jso, IFAPI_HIERARCHY *out)
TSS2_RC ifapi_json_IFAPI_IMA_EVENT_deserialize (json_object *jso, IFAPI_IMA_EVENT *out)
TSS2_RC ifapi_json_IFAPI_KEY_deserialize (json_object *jso, IFAPI_KEY *out)
TSS2_RC ifapi_json_IFAPI_NV_deserialize (json_object *jso, IFAPI_NV *out)
TSS2_RC ifapi_json_IFAPI_OBJECT_TYPE_CONSTANT_deserialize (json_object *jso, IFAPI_OBJECT_TYPE_CONSTANT *out)
TSS2_RC ifapi_json_IFAPI_OBJECT_deserialize (json_object *jso, IFAPI_OBJECT *out)
TSS2_RC ifapi_json_IFAPI_TSS_EVENT_deserialize (json_object *jso, IFAPI_TSS_EVENT *out)
TSS2_RC ifapi_json_char_deserialize (json_object *jso, char **out)
bool ifapi_get_sub_object (json_object *jso, char *name, json_object **sub_jso)
TSS2_RC ifapi_json_BYTE_array_deserialize (size_t max, json_object *jso, BYTE *out)
TSS2_RC ifapi_json_BYTE_deserialize (json_object *jso, BYTE *out)
TSS2_RC ifapi_json_TPM2B_CREATION_DATA_deserialize (json_object *jso, TPM2B_CREATION_DATA *out)
TSS2_RC ifapi_json_TPM2B_DATA_deserialize (json_object *jso, TPM2B_DATA *out)
TSS2_RC ifapi_json_TPM2B_DIGEST_deserialize (json_object *jso, TPM2B_DIGEST *out)
TSS2_RC ifapi_json_TPM2B_ECC_PARAMETER_deserialize (json_object *jso, TPM2B_ECC_PARAMETER *out)
TSS2_RC ifapi_json_TPM2B_ENCRYPTED_SECRET_deserialize (json_object *jso, TPM2B_ENCRYPTED_SECRET *out)
TSS2_RC ifapi_json_TPM2B_EVENT_deserialize (json_object *jso, TPM2B_EVENT *out)
TSS2_RC ifapi_json_TPM2B_MAX_NV_BUFFER_deserialize (json_object *jso, TPM2B_MAX_NV_BUFFER *out)
TSS2_RC ifapi_json_TPM2B_NAME_deserialize (json_object *jso, TPM2B_NAME *out)
TSS2_RC ifapi_json_TPM2B_NONCE_deserialize (json_object *jso, TPM2B_NONCE *out)
TSS2_RC ifapi_json_TPM2B_NV_PUBLIC_deserialize (json_object *jso, TPM2B_NV_PUBLIC *out)
TSS2_RC ifapi_json_TPM2B_OPERAND_deserialize (json_object *jso, TPM2B_OPERAND *out)
TSS2_RC ifapi_json_TPM2B_PRIVATE_deserialize (json_object *jso, TPM2B_PRIVATE *out)
TSS2_RC ifapi_json_TPM2B_PUBLIC_KEY_RSA_deserialize (json_object *jso, TPM2B_PUBLIC_KEY_RSA *out)
TSS2_RC ifapi_json_TPM2B_PUBLIC_deserialize (json_object *jso, TPM2B_PUBLIC *out)
TSS2_RC ifapi_json_TPM2_ALG_ID_deserialize (json_object *jso, TPM2_ALG_ID *out)
TSS2_RC ifapi_json_TPM2_CC_deserialize (json_object *jso, TPM2_CC *out)
TSS2_RC ifapi_json_TPM2_ECC_CURVE_deserialize (json_object *jso, TPM2_ECC_CURVE *out)
TSS2_RC ifapi_json_TPM2_EO_deserialize (json_object *jso, TPM2_EO *out)
TSS2_RC ifapi_json_TPM2_GENERATED_deserialize (json_object *jso, TPM2_GENERATED *out)
TSS2_RC ifapi_json_TPM2_HANDLE_deserialize (json_object *jso, TPM2_HANDLE *out)
TSS2_RC ifapi_json_TPM2_NT_deserialize (json_object *jso, TPM2_NT *out)
TSS2_RC ifapi_json_TPM2_PT_PCR_deserialize (json_object *jso, TPM2_PT_PCR *out)
TSS2_RC ifapi_json_TPM2_ST_deserialize (json_object *jso, TPM2_ST *out)
TSS2_RC ifapi_json_TPMA_LOCALITY_deserialize (json_object *jso, TPMA_LOCALITY *out)
TSS2_RC ifapi_json_TPMA_NV_deserialize (json_object *jso, TPMA_NV *out)
TSS2_RC ifapi_json_TPMA_OBJECT_deserialize (json_object *jso, TPMA_OBJECT *out)
TSS2_RC ifapi_json_TPMI_AES_KEY_BITS_deserialize (json_object *jso, TPMI_AES_KEY_BITS *out)
TSS2_RC ifapi_json_TPMI_ALG_ECC_SCHEME_deserialize (json_object *jso, TPMI_ALG_ECC_SCHEME *out)
TSS2_RC ifapi_json_TPMI_ALG_HASH_deserialize (json_object *jso, TPMI_ALG_HASH *out)
TSS2_RC ifapi_json_TPMI_ALG_KDF_deserialize (json_object *jso, TPMI_ALG_KDF *out)
TSS2_RC ifapi_json_TPMI_ALG_KEYEDHASH_SCHEME_deserialize (json_object *jso, TPMI_ALG_KEYEDHASH_SCHEME *out)
TSS2_RC ifapi_json_TPMI_ALG_PUBLIC_deserialize (json_object *jso, TPMI_ALG_PUBLIC *out)
TSS2_RC ifapi_json_TPMI_ALG_RSA_DECRYPT_deserialize (json_object *jso, TPMI_ALG_RSA_DECRYPT *out)
TSS2_RC ifapi_json_TPMI_ALG_RSA_SCHEME_deserialize (json_object *jso, TPMI_ALG_RSA_SCHEME *out)
TSS2_RC ifapi_json_TPMI_ALG_SIG_SCHEME_deserialize (json_object *jso, TPMI_ALG_SIG_SCHEME *out)
TSS2_RC ifapi_json_TPMI_ALG_SYM_MODE_deserialize (json_object *jso, TPMI_ALG_SYM_MODE *out)
TSS2_RC ifapi_json_TPMI_ALG_CIPHER_MODE_deserialize (json_object *jso, TPMI_ALG_CIPHER_MODE *out)
TSS2_RC ifapi_json_TPMI_ALG_SYM_OBJECT_deserialize (json_object *jso, TPMI_ALG_SYM_OBJECT *out)
TSS2_RC ifapi_json_TPMI_ALG_SYM_deserialize (json_object *jso, TPMI_ALG_SYM *out)
TSS2_RC ifapi_json_TPMI_ECC_CURVE_deserialize (json_object *jso, TPMI_ECC_CURVE *out)
TSS2_RC ifapi_json_TPMI_RH_HIERARCHY_deserialize (json_object *jso, TPMI_RH_HIERARCHY *out)
TSS2_RC ifapi_json_TPMI_RH_NV_INDEX_deserialize (json_object *jso, TPMI_RH_NV_INDEX *out)
TSS2_RC ifapi_json_TPMI_RSA_KEY_BITS_deserialize (json_object *jso, TPMI_RSA_KEY_BITS *out)
TSS2_RC ifapi_json_TPMI_ST_ATTEST_deserialize (json_object *jso, TPMI_ST_ATTEST *out)
TSS2_RC ifapi_json_TPMI_YES_NO_deserialize (json_object *jso, TPMI_YES_NO *out)
TSS2_RC ifapi_json_TPML_DIGEST_VALUES_deserialize (json_object *jso, TPML_DIGEST_VALUES *out)
TSS2_RC ifapi_json_TPML_PCR_SELECTION_deserialize (json_object *jso, TPML_PCR_SELECTION *out)
TSS2_RC ifapi_json_TPMS_ATTEST_deserialize (json_object *jso, TPMS_ATTEST *out)
TSS2_RC ifapi_json_TPMS_CERTIFY_INFO_deserialize (json_object *jso, TPMS_CERTIFY_INFO *out)
TSS2_RC ifapi_json_TPMS_CLOCK_INFO_deserialize (json_object *jso, TPMS_CLOCK_INFO *out)
TSS2_RC ifapi_json_TPMS_COMMAND_AUDIT_INFO_deserialize (json_object *jso, TPMS_COMMAND_AUDIT_INFO *out)
TSS2_RC ifapi_json_TPMS_CREATION_DATA_deserialize (json_object *jso, TPMS_CREATION_DATA *out)
TSS2_RC ifapi_json_TPMS_CREATION_INFO_deserialize (json_object *jso, TPMS_CREATION_INFO *out)
TSS2_RC ifapi_json_TPMS_ECC_PARMS_deserialize (json_object *jso, TPMS_ECC_PARMS *out)
TSS2_RC ifapi_json_TPMS_ECC_POINT_deserialize (json_object *jso, TPMS_ECC_POINT *out)
TSS2_RC ifapi_json_TPMS_EMPTY_deserialize (json_object *jso, TPMS_EMPTY *out)
TSS2_RC ifapi_json_TPMS_ENC_SCHEME_OAEP_deserialize (json_object *jso, TPMS_ENC_SCHEME_OAEP *out)
TSS2_RC ifapi_json_TPMS_ENC_SCHEME_RSAES_deserialize (json_object *jso, TPMS_ENC_SCHEME_RSAES *out)
TSS2_RC ifapi_json_TPMS_KEYEDHASH_PARMS_deserialize (json_object *jso, TPMS_KEYEDHASH_PARMS *out)
TSS2_RC ifapi_json_TPMS_KEY_SCHEME_ECDH_deserialize (json_object *jso, TPMS_KEY_SCHEME_ECDH *out)
TSS2_RC ifapi_json_TPMS_NV_CERTIFY_INFO_deserialize (json_object *jso, TPMS_NV_CERTIFY_INFO *out)
TSS2_RC ifapi_json_TPMS_NV_PUBLIC_deserialize (json_object *jso, TPMS_NV_PUBLIC *out)
TSS2_RC ifapi_json_TPMS_PCR_SELECTION_deserialize (json_object *jso, TPMS_PCR_SELECTION *out)
TSS2_RC ifapi_json_TPMS_PCR_SELECT_deserialize (json_object *jso, TPMS_PCR_SELECT *out)
TSS2_RC ifapi_json_TPMS_QUOTE_INFO_deserialize (json_object *jso, TPMS_QUOTE_INFO *out)
TSS2_RC ifapi_json_TPMS_RSA_PARMS_deserialize (json_object *jso, TPMS_RSA_PARMS *out)
TSS2_RC ifapi_json_TPMS_SCHEME_ECDAA_deserialize (json_object *jso, TPMS_SCHEME_ECDAA *out)
TSS2_RC ifapi_json_TPMS_SCHEME_HASH_deserialize (json_object *jso, TPMS_SCHEME_HASH *out)
TSS2_RC ifapi_json_TPMS_SCHEME_HMAC_deserialize (json_object *jso, TPMS_SCHEME_HMAC *out)
TSS2_RC ifapi_json_TPMS_SCHEME_KDF1_SP800_108_deserialize (json_object *jso, TPMS_SCHEME_KDF1_SP800_108 *out)
TSS2_RC ifapi_json_TPMS_SCHEME_KDF1_SP800_56A_deserialize (json_object *jso, TPMS_SCHEME_KDF1_SP800_56A *out)
TSS2_RC ifapi_json_TPMS_SCHEME_MGF1_deserialize (json_object *jso, TPMS_SCHEME_MGF1 *out)
TSS2_RC ifapi_json_TPMS_SCHEME_XOR_deserialize (json_object *jso, TPMS_SCHEME_XOR *out)
TSS2_RC ifapi_json_TPMS_SESSION_AUDIT_INFO_deserialize (json_object *jso, TPMS_SESSION_AUDIT_INFO *out)
TSS2_RC ifapi_json_TPMS_SIGNATURE_ECC_deserialize (json_object *jso, TPMS_SIGNATURE_ECC *out)
TSS2_RC ifapi_json_TPMS_SIGNATURE_ECDAA_deserialize (json_object *jso, TPMS_SIGNATURE_ECDAA *out)
TSS2_RC ifapi_json_TPMS_SIGNATURE_ECDSA_deserialize (json_object *jso, TPMS_SIGNATURE_ECDSA *out)
TSS2_RC ifapi_json_TPMS_SIGNATURE_ECSCHNORR_deserialize (json_object *jso, TPMS_SIGNATURE_ECSCHNORR *out)
TSS2_RC ifapi_json_TPMS_SIGNATURE_RSAPSS_deserialize (json_object *jso, TPMS_SIGNATURE_RSAPSS *out)
TSS2_RC ifapi_json_TPMS_SIGNATURE_RSASSA_deserialize (json_object *jso, TPMS_SIGNATURE_RSASSA *out)
TSS2_RC ifapi_json_TPMS_SIGNATURE_RSA_deserialize (json_object *jso, TPMS_SIGNATURE_RSA *out)
TSS2_RC ifapi_json_TPMS_SIGNATURE_SM2_deserialize (json_object *jso, TPMS_SIGNATURE_SM2 *out)
TSS2_RC ifapi_json_TPMS_SIG_SCHEME_ECDAA_deserialize (json_object *jso, TPMS_SIG_SCHEME_ECDAA *out)
TSS2_RC ifapi_json_TPMS_SIG_SCHEME_ECDSA_deserialize (json_object *jso, TPMS_SIG_SCHEME_ECDSA *out)
TSS2_RC ifapi_json_TPMS_SIG_SCHEME_ECSCHNORR_deserialize (json_object *jso, TPMS_SIG_SCHEME_ECSCHNORR *out)
TSS2_RC ifapi_json_TPMS_SIG_SCHEME_RSAPSS_deserialize (json_object *jso, TPMS_SIG_SCHEME_RSAPSS *out)
TSS2_RC ifapi_json_TPMS_SIG_SCHEME_RSASSA_deserialize (json_object *jso, TPMS_SIG_SCHEME_RSASSA *out)
TSS2_RC ifapi_json_TPMS_SIG_SCHEME_SM2_deserialize (json_object *jso, TPMS_SIG_SCHEME_SM2 *out)
TSS2_RC ifapi_json_TPMS_SYMCIPHER_PARMS_deserialize (json_object *jso, TPMS_SYMCIPHER_PARMS *out)
TSS2_RC ifapi_json_TPMS_TIME_ATTEST_INFO_deserialize (json_object *jso, TPMS_TIME_ATTEST_INFO *out)
TSS2_RC ifapi_json_TPMS_TIME_INFO_deserialize (json_object *jso, TPMS_TIME_INFO *out)
TSS2_RC ifapi_json_TPMT_ECC_SCHEME_deserialize (json_object *jso, TPMT_ECC_SCHEME *out)
TSS2_RC ifapi_json_TPMT_HA_deserialize (json_object *jso, TPMT_HA *out)
TSS2_RC ifapi_json_TPMT_KDF_SCHEME_deserialize (json_object *jso, TPMT_KDF_SCHEME *out)
TSS2_RC ifapi_json_TPMT_KEYEDHASH_SCHEME_deserialize (json_object *jso, TPMT_KEYEDHASH_SCHEME *out)
TSS2_RC ifapi_json_TPMT_PUBLIC_deserialize (json_object *jso, TPMT_PUBLIC *out)
TSS2_RC ifapi_json_TPMT_RSA_DECRYPT_deserialize (json_object *jso, TPMT_RSA_DECRYPT *out)
TSS2_RC ifapi_json_TPMT_RSA_SCHEME_deserialize (json_object *jso, TPMT_RSA_SCHEME *out)
TSS2_RC ifapi_json_TPMT_SIGNATURE_deserialize (json_object *jso, TPMT_SIGNATURE *out)
TSS2_RC ifapi_json_TPMT_SIG_SCHEME_deserialize (json_object *jso, TPMT_SIG_SCHEME *out)
TSS2_RC ifapi_json_TPMT_SYM_DEF_OBJECT_deserialize (json_object *jso, TPMT_SYM_DEF_OBJECT *out)
TSS2_RC ifapi_json_TPMT_SYM_DEF_deserialize (json_object *jso, TPMT_SYM_DEF *out)
TSS2_RC ifapi_json_TPMT_TK_CREATION_deserialize (json_object *jso, TPMT_TK_CREATION *out)
TSS2_RC ifapi_json_TPMU_ASYM_SCHEME_deserialize (UINT32 selector, json_object *jso, TPMU_ASYM_SCHEME *out)
TSS2_RC ifapi_json_TPMU_ATTEST_deserialize (UINT32 selector, json_object *jso, TPMU_ATTEST *out)
TSS2_RC ifapi_json_TPMU_HA_deserialize (UINT32 selector, json_object *jso, TPMU_HA *out)
TSS2_RC ifapi_json_TPMU_KDF_SCHEME_deserialize (UINT32 selector, json_object *jso, TPMU_KDF_SCHEME *out)
TSS2_RC ifapi_json_TPMU_PUBLIC_ID_deserialize (UINT32 selector, json_object *jso, TPMU_PUBLIC_ID *out)
TSS2_RC ifapi_json_TPMU_PUBLIC_PARMS_deserialize (UINT32 selector, json_object *jso, TPMU_PUBLIC_PARMS *out)
TSS2_RC ifapi_json_TPMU_SCHEME_KEYEDHASH_deserialize (UINT32 selector, json_object *jso, TPMU_SCHEME_KEYEDHASH *out)
TSS2_RC ifapi_json_TPMU_SIGNATURE_deserialize (UINT32 selector, json_object *jso, TPMU_SIGNATURE *out)
TSS2_RC ifapi_json_TPMU_SIG_SCHEME_deserialize (UINT32 selector, json_object *jso, TPMU_SIG_SCHEME *out)
TSS2_RC ifapi_json_TPMU_SYM_KEY_BITS_deserialize (UINT32 selector, json_object *jso, TPMU_SYM_KEY_BITS *out)
TSS2_RC ifapi_json_TPMU_SYM_MODE_deserialize (UINT32 selector, json_object *jso, TPMU_SYM_MODE *out)
TSS2_RC ifapi_json_UINT16_deserialize (json_object *jso, UINT16 *out)
TSS2_RC ifapi_json_UINT32_deserialize (json_object *jso, UINT32 *out)
TSS2_RC ifapi_json_UINT64_deserialize (json_object *jso, UINT64 *out)
TSS2_RC ifapi_json_UINT8_ARY_deserialize (json_object *jso, UINT8_ARY *out)
TSS2_RC ifapi_json_UINT8_deserialize (json_object *jso, UINT8 *out)
TSS2_RC ifapi_json_byte_deserialize (json_object *jso, UINT32 max, BYTE *out, UINT16 *out_size)
TSS2_RC ifapi_json_pcr_selection_deserialize (json_object *jso, UINT8 *sizeofSelect, BYTE pcrSelect[])
TSS2_RC ifapi_json_TPMI_POLICYTYPE_deserialize (json_object *jso, TPMI_POLICYTYPE *out)
TSS2_RC ifapi_json_TPMI_POLICYTYPE_deserialize_txt (json_object *jso, TPMI_POLICYTYPE *out)
TSS2_RC ifapi_json_TPML_PCRVALUES_deserialize (json_object *jso, TPML_PCRVALUES **out)
TSS2_RC ifapi_json_TPML_POLICYAUTHORIZATIONS_deserialize (json_object *jso, TPML_POLICYAUTHORIZATIONS **out)
TSS2_RC ifapi_json_TPML_POLICYBRANCHES_deserialize (json_object *jso, TPML_POLICYBRANCHES **out)
TSS2_RC ifapi_json_TPML_POLICYELEMENTS_deserialize (json_object *jso, TPML_POLICYELEMENTS **out)
TSS2_RC ifapi_json_TPMS_PCRVALUE_deserialize (json_object *jso, TPMS_PCRVALUE *out)
TSS2_RC ifapi_json_TPMS_POLICYACTION_deserialize (json_object *jso, TPMS_POLICYACTION *out)
TSS2_RC ifapi_json_TPMS_POLICYAUTHORIZATION_deserialize (json_object *jso, TPMS_POLICYAUTHORIZATION *out)
TSS2_RC ifapi_json_TPMS_POLICYAUTHORIZENV_deserialize (json_object *jso, TPMS_POLICYAUTHORIZENV *out)
TSS2_RC ifapi_json_TPMS_POLICYAUTHORIZE_deserialize (json_object *jso, TPMS_POLICYAUTHORIZE *out)
TSS2_RC ifapi_json_TPMS_POLICYAUTHVALUE_deserialize (json_object *jso, TPMS_POLICYAUTHVALUE *out)
TSS2_RC ifapi_json_TPMS_POLICYBRANCH_deserialize (json_object *jso, TPMS_POLICYBRANCH *out)
TSS2_RC ifapi_json_TPMS_POLICYCOMMANDCODE_deserialize (json_object *jso, TPMS_POLICYCOMMANDCODE *out)
TSS2_RC ifapi_json_TPMS_POLICYCOUNTERTIMER_deserialize (json_object *jso, TPMS_POLICYCOUNTERTIMER *out)
TSS2_RC ifapi_json_TPMS_POLICYCPHASH_deserialize (json_object *jso, TPMS_POLICYCPHASH *out)
TSS2_RC ifapi_json_TPMS_POLICYDUPLICATIONSELECT_deserialize (json_object *jso, TPMS_POLICYDUPLICATIONSELECT *out)
TSS2_RC ifapi_json_TPMS_POLICYLOCALITY_deserialize (json_object *jso, TPMS_POLICYLOCALITY *out)
TSS2_RC ifapi_json_TPMS_POLICYNAMEHASH_deserialize (json_object *jso, TPMS_POLICYNAMEHASH *out)
TSS2_RC ifapi_json_TPMS_POLICYNVWRITTEN_deserialize (json_object *jso, TPMS_POLICYNVWRITTEN *out)
TSS2_RC ifapi_json_TPMS_POLICYNV_deserialize (json_object *jso, TPMS_POLICYNV *out)
TSS2_RC ifapi_json_TPMS_POLICYOR_deserialize (json_object *jso, TPMS_POLICYOR *out)
TSS2_RC ifapi_json_TPMS_POLICYPASSWORD_deserialize (json_object *jso, TPMS_POLICYPASSWORD *out)
TSS2_RC ifapi_json_TPMS_POLICYPCR_deserialize (json_object *jso, TPMS_POLICYPCR *out)
TSS2_RC ifapi_json_TPMS_POLICYPHYSICALPRESENCE_deserialize (json_object *jso, TPMS_POLICYPHYSICALPRESENCE *out)
TSS2_RC ifapi_json_TPMS_POLICYSECRET_deserialize (json_object *jso, TPMS_POLICYSECRET *out)
TSS2_RC ifapi_json_TPMS_POLICYSIGNED_deserialize (json_object *jso, TPMS_POLICYSIGNED *out)
TSS2_RC ifapi_json_TPMS_POLICYTEMPLATE_deserialize (json_object *jso, TPMS_POLICYTEMPLATE *out)
TSS2_RC ifapi_json_TPMS_POLICY_deserialize (json_object *jso, TPMS_POLICY *out)
TSS2_RC ifapi_json_TPMT_POLICYELEMENT_deserialize (json_object *jso, TPMT_POLICYELEMENT *out)
TSS2_RC ifapi_json_TPMU_POLICYELEMENT_deserialize (UINT32 selector, json_object *jso, TPMU_POLICYELEMENT *out)
TSS2_RC ifapi_json_import_IFAPI_KEY_deserialize (json_object *jso, IFAPI_KEY *out)

Detailed Description
Provides functions for the deserialization from JSON to FAPI objects. 

Function Documentation
bool ifapi_get_sub_object (json_object *  jso, char *  name, json_object **  sub_jso)
Get sub object from a json object.
A sub object with a certain name stored in the passed object is returned. If the sub object is not found e second trial with the lower case version of the name will be performed.
param[in] jso the object with the sub object. param[in] name the name of the stored sub object. param[out] sub_jso the pointer to the sub object. 
Return values:
true 	if object was found. 	
false 	if the object was not found. 	
TSS2_RC ifapi_json_BYTE_array_deserialize (size_t  max, json_object *  jso, BYTE *  out)
Deserialize an array of BYTE structures.
Parameters:
in	max 	the maximal number of bytess to be deserialized. 	
in	jso 	the JSON object with the byte array. 	
in	out 	the byte array for deserialization. 	
Return values:
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_RC ifapi_json_byte_deserialize (json_object *  jso, UINT32  max, BYTE *  out, UINT16 *  out_size)
Deserialize a json array of bytes.
Parameters:
in	jso 	the parent object of the json byte array. 	
in	max 	maximal size of the deserialized object. 	
out	out* 	Pointer to the deserialized byte array. 	
out	out_size 	the length of the deserialized byte array. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_BYTE_deserialize (json_object *  jso, BYTE *  out)
Deserialize a BYTE json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_char_deserialize (json_object *  jso, char **  out)
Deserialize a character string.
Parameters:
in	jso 	json string object. 	
out	out 	the pointer to the created string. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_FAPI_QUOTE_INFO_deserialize (json_object *  jso, FAPI_QUOTE_INFO *  out)
Deserialize a FAPI_QUOTE_INFO json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_IFAPI_DUPLICATE_deserialize (json_object *  jso, IFAPI_DUPLICATE *  out)
Deserialize a IFAPI_DUPLICATE json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_IFAPI_EVENT_deserialize (json_object *  jso, IFAPI_EVENT *  out)
Deserialize a IFAPI_EVENT json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_IFAPI_EVENT_TYPE_deserialize (json_object *  jso, IFAPI_EVENT_TYPE *  out)
Deserialize a IFAPI_EVENT_TYPE json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_IFAPI_EVENT_TYPE_deserialize_txt (json_object *  jso, IFAPI_EVENT_TYPE *  out)
Deserialize a json object of type IFAPI_EVENT_TYPE.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_IFAPI_EVENT_UNION_deserialize (UINT32  selector, json_object *  jso, IFAPI_EVENT_UNION *  out)
Deserialize a IFAPI_EVENT_UNION json object.
This functions expects the Bitfield to be encoded as unsigned int in host-endianess. 
Parameters:
in	jso 	the json object to be deserialized. 	
in	selector 	the event type. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_IFAPI_EXT_PUB_KEY_deserialize (json_object *  jso, IFAPI_EXT_PUB_KEY *  out)
Deserialize a IFAPI_EXT_PUB_KEY json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_IFAPI_HIERARCHY_deserialize (json_object *  jso, IFAPI_HIERARCHY *  out)
Deserialize a IFAPI_NV json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_IFAPI_IMA_EVENT_deserialize (json_object *  jso, IFAPI_IMA_EVENT *  out)
Deserialize a IFAPI_IMA_EVENT json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_IFAPI_KEY_deserialize (json_object *  jso, IFAPI_KEY *  out)
Deserialize a IFAPI_KEY json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_IFAPI_NV_deserialize (json_object *  jso, IFAPI_NV *  out)
Deserialize a IFAPI_NV json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_IFAPI_OBJECT_deserialize (json_object *  jso, IFAPI_OBJECT *  out)
Deserialize a IFAPI_OBJECT json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occurred. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_IFAPI_OBJECT_TYPE_CONSTANT_deserialize (json_object *  jso, IFAPI_OBJECT_TYPE_CONSTANT *  out)
Deserialize a IFAPI_OBJECT_TYPE_CONSTANT json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_IFAPI_TSS_EVENT_deserialize (json_object *  jso, IFAPI_TSS_EVENT *  out)
Deserialize a IFAPI_TSS_EVENT json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
ifapi_json_import_IFAPI_KEY_deserialize (json_object *  jso, IFAPI_KEY *  out)
Deserialize a import data to create a IFAPI_KEY json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_pcr_selection_deserialize (json_object *  jso, UINT8 *  sizeofSelect, BYTE  pcrSelect[])
Deserialize json object which represents a pcr selection.
Parameters:
in	jso 	json array of pcr registers. 	
out	sizeofSelect 	size of bit mask for used pcr registers. 	
out	pcrSelect 	byte array with bit mask. 	
Return values:
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_RC ifapi_json_TPM2_ALG_ID_deserialize (json_object *  jso, TPM2_ALG_ID *  out)
Deserialize a TPM2_ALG_ID json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPM2_CC_deserialize (json_object *  jso, TPM2_CC *  out)
Deserialize a TPM2_CC json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPM2_ECC_CURVE_deserialize (json_object *  jso, TPM2_ECC_CURVE *  out)
Deserialize a TPM2_ECC_CURVE json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPM2_EO_deserialize (json_object *  jso, TPM2_EO *  out)
Deserialize a TPM2_EO json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPM2_GENERATED_deserialize (json_object *  jso, TPM2_GENERATED *  out)
Deserialize a TPM2_GENERATED json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPM2_HANDLE_deserialize (json_object *  jso, TPM2_HANDLE *  out)
Deserialize a TPM2_HANDLE json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPM2_NT_deserialize (json_object *  jso, TPM2_NT *  out)
Deserialize a TPM2_NT json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPM2_PT_PCR_deserialize (json_object *  jso, TPM2_PT_PCR *  out)
Deserialize a TPM2_PT_PCR json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPM2_ST_deserialize (json_object *  jso, TPM2_ST *  out)
Deserialize a TPM2_ST json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPM2B_CREATION_DATA_deserialize (json_object *  jso, TPM2B_CREATION_DATA *  out)
Deserialize a TPM2B_CREATION_DATA json object. 
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPM2B_DATA_deserialize (json_object *  jso, TPM2B_DATA *  out)
Deserialize a TPM2B_DATA json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPM2B_DIGEST_deserialize (json_object *  jso, TPM2B_DIGEST *  out)
Deserialize a TPM2B_DIGEST json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPM2B_ECC_PARAMETER_deserialize (json_object *  jso, TPM2B_ECC_PARAMETER *  out)
Deserialize a TPM2B_ECC_PARAMETER json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPM2B_ENCRYPTED_SECRET_deserialize (json_object *  jso, TPM2B_ENCRYPTED_SECRET *  out)
Deserialize a TPM2B_ENCRYPTED_SECRET json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPM2B_EVENT_deserialize (json_object *  jso, TPM2B_EVENT *  out)
Deserialize a TPM2B_EVENT json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPM2B_MAX_NV_BUFFER_deserialize (json_object *  jso, TPM2B_MAX_NV_BUFFER *  out)
Deserialize a TPM2B_MAX_NV_BUFFER json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPM2B_NAME_deserialize (json_object *  jso, TPM2B_NAME *  out)
Deserialize a TPM2B_NAME json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPM2B_NONCE_deserialize (json_object *  jso, TPM2B_NONCE *  out)
Deserialize a TPM2B_NONCE json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPM2B_NV_PUBLIC_deserialize (json_object *  jso, TPM2B_NV_PUBLIC *  out)
Deserialize a TPM2B_NV_PUBLIC json object. 
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPM2B_OPERAND_deserialize (json_object *  jso, TPM2B_OPERAND *  out)
Deserialize a TPM2B_OPERAND json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPM2B_PRIVATE_deserialize (json_object *  jso, TPM2B_PRIVATE *  out)
Deserialize a TPM2B_PRIVATE json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPM2B_PUBLIC_deserialize (json_object *  jso, TPM2B_PUBLIC *  out)
Deserialize a TPM2B_PUBLIC json object. 
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPM2B_PUBLIC_KEY_RSA_deserialize (json_object *  jso, TPM2B_PUBLIC_KEY_RSA *  out)
Deserialize a TPM2B_PUBLIC_KEY_RSA json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMA_LOCALITY_deserialize (json_object *  jso, TPMA_LOCALITY *  out)
Deserialize a TPMA_LOCALITY json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPMA_NV_deserialize (json_object *  jso, TPMA_NV *  out)
Deserialize a TPMA_NV json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMA_OBJECT_deserialize (json_object *  jso, TPMA_OBJECT *  out)
Deserialize a TPMA_OBJECT json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPMI_AES_KEY_BITS_deserialize (json_object *  jso, TPMI_AES_KEY_BITS *  out)
Deserialize a TPMI_AES_KEY_BITS json object.
Return values:
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_RC ifapi_json_TPMI_ALG_CIPHER_MODE_deserialize (json_object *  jso, TPMI_ALG_CIPHER_MODE *  out)
Deserialize a TPMI_ALG_CIPHER_MODE json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPMI_ALG_ECC_SCHEME_deserialize (json_object *  jso, TPMI_ALG_ECC_SCHEME *  out)
Deserialize a TPMI_ALG_ECC_SCHEME json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPMI_ALG_HASH_deserialize (json_object *  jso, TPMI_ALG_HASH *  out)
Deserialize a TPMI_ALG_HASH json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPMI_ALG_KDF_deserialize (json_object *  jso, TPMI_ALG_KDF *  out)
Deserialize a TPMI_ALG_KDF json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPMI_ALG_KEYEDHASH_SCHEME_deserialize (json_object *  jso, TPMI_ALG_KEYEDHASH_SCHEME *  out)
Deserialize a TPMI_ALG_KEYEDHASH_SCHEME json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPMI_ALG_PUBLIC_deserialize (json_object *  jso, TPMI_ALG_PUBLIC *  out)
Deserialize a TPMI_ALG_PUBLIC json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPMI_ALG_RSA_DECRYPT_deserialize (json_object *  jso, TPMI_ALG_RSA_DECRYPT *  out)
Deserialize a TPMI_ALG_RSA_DECRYPT json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPMI_ALG_RSA_SCHEME_deserialize (json_object *  jso, TPMI_ALG_RSA_SCHEME *  out)
Deserialize a TPMI_ALG_RSA_SCHEME json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPMI_ALG_SIG_SCHEME_deserialize (json_object *  jso, TPMI_ALG_SIG_SCHEME *  out)
Deserialize a TPMI_ALG_SIG_SCHEME json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPMI_ALG_SYM_deserialize (json_object *  jso, TPMI_ALG_SYM *  out)
Deserialize a TPMI_ALG_SYM json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPMI_ALG_SYM_MODE_deserialize (json_object *  jso, TPMI_ALG_SYM_MODE *  out)
Deserialize a TPMI_ALG_SYM_MODE json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPMI_ALG_SYM_OBJECT_deserialize (json_object *  jso, TPMI_ALG_SYM_OBJECT *  out)
Deserialize a TPMI_ALG_SYM_OBJECT json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPMI_ECC_CURVE_deserialize (json_object *  jso, TPMI_ECC_CURVE *  out)
Deserialize a TPMI_ECC_CURVE json object.
Return values:
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_RC ifapi_json_TPMI_POLICYTYPE_deserialize (json_object *  jso, TPMI_POLICYTYPE *  out)
Deserialize a TPMI_POLICYTYPE json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPMI_POLICYTYPE_deserialize_txt (json_object *  jso, TPMI_POLICYTYPE *  out)
Deserialize a json object of type TPMI_POLICYTYPE.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPMI_RH_HIERARCHY_deserialize (json_object *  jso, TPMI_RH_HIERARCHY *  out)
Deserialize a TPMI_RH_HIERARCHY json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPMI_RH_NV_INDEX_deserialize (json_object *  jso, TPMI_RH_NV_INDEX *  out)
Deserialize a TPMI_RH_NV_INDEX json object.
Return values:
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_RC ifapi_json_TPMI_RSA_KEY_BITS_deserialize (json_object *  jso, TPMI_RSA_KEY_BITS *  out)
Deserialize a TPMI_RSA_KEY_BITS json object.
Return values:
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_RC ifapi_json_TPMI_ST_ATTEST_deserialize (json_object *  jso, TPMI_ST_ATTEST *  out)
Deserialize a TPMI_ST_ATTEST json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPMI_YES_NO_deserialize (json_object *  jso, TPMI_YES_NO *  out)
Deserialize a TPMI_YES_NO json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPML_DIGEST_VALUES_deserialize (json_object *  jso, TPML_DIGEST_VALUES *  out)
Deserialize a TPML_DIGEST_VALUES json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPML_PCR_SELECTION_deserialize (json_object *  jso, TPML_PCR_SELECTION *  out)
Deserialize a TPML_PCR_SELECTION json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPML_PCRVALUES_deserialize (json_object *  jso, TPML_PCRVALUES **  out)
Deserialize a TPML_PCRVALUES json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_TPML_POLICYAUTHORIZATIONS_deserialize (json_object *  jso, TPML_POLICYAUTHORIZATIONS **  out)
Deserialize a TPML_POLICYAUTHORIZATIONS json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_TPML_POLICYBRANCHES_deserialize (json_object *  jso, TPML_POLICYBRANCHES **  out)
Deserialize a TPML_POLICYBRANCHES json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_TPML_POLICYELEMENTS_deserialize (json_object *  jso, TPML_POLICYELEMENTS **  out)
Deserialize a TPML_POLICYELEMENTS json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_TPMS_ATTEST_deserialize (json_object *  jso, TPMS_ATTEST *  out)
Deserialize a TPMS_ATTEST json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_CERTIFY_INFO_deserialize (json_object *  jso, TPMS_CERTIFY_INFO *  out)
Deserialize a TPMS_CERTIFY_INFO json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_CLOCK_INFO_deserialize (json_object *  jso, TPMS_CLOCK_INFO *  out)
Deserialize a TPMS_CLOCK_INFO json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_COMMAND_AUDIT_INFO_deserialize (json_object *  jso, TPMS_COMMAND_AUDIT_INFO *  out)
Deserialize a TPMS_COMMAND_AUDIT_INFO json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_CREATION_DATA_deserialize (json_object *  jso, TPMS_CREATION_DATA *  out)
Deserialize a TPMS_CREATION_DATA json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_CREATION_INFO_deserialize (json_object *  jso, TPMS_CREATION_INFO *  out)
Deserialize a TPMS_CREATION_INFO json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_ECC_PARMS_deserialize (json_object *  jso, TPMS_ECC_PARMS *  out)
Deserialize a TPMS_ECC_PARMS json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_ECC_POINT_deserialize (json_object *  jso, TPMS_ECC_POINT *  out)
Deserialize a TPMS_ECC_POINT json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_EMPTY_deserialize (json_object *  jso, TPMS_EMPTY *  out)
Deserialize a TPMS_EMPTY .
Parameters:
out	out 	not used. 	
in	jso 	not used. 	
TSS2_RC ifapi_json_TPMS_ENC_SCHEME_OAEP_deserialize (json_object *  jso, TPMS_ENC_SCHEME_OAEP *  out)
Deserialize a TPMS_ENC_SCHEME_OAEP json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_ENC_SCHEME_RSAES_deserialize (json_object *  jso, TPMS_ENC_SCHEME_RSAES *  out)
Deserialize a TPMS_ENC_SCHEME_RSAES json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPMS_KEY_SCHEME_ECDH_deserialize (json_object *  jso, TPMS_KEY_SCHEME_ECDH *  out)
Deserialize a TPMS_KEY_SCHEME_ECDH json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_KEYEDHASH_PARMS_deserialize (json_object *  jso, TPMS_KEYEDHASH_PARMS *  out)
Deserialize a TPMS_KEYEDHASH_PARMS json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_NV_CERTIFY_INFO_deserialize (json_object *  jso, TPMS_NV_CERTIFY_INFO *  out)
Deserialize a TPMS_NV_CERTIFY_INFO json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_NV_PUBLIC_deserialize (json_object *  jso, TPMS_NV_PUBLIC *  out)
Deserialize a TPMS_NV_PUBLIC json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_PCR_SELECT_deserialize (json_object *  jso, TPMS_PCR_SELECT *  out)
Deserialize a TPMS_PCR_SELECT variable.
Parameters:
in	jso 	json object to be deserialized. 	
out	out 	the deserialized object. 	
Return values:
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_RC ifapi_json_TPMS_PCR_SELECTION_deserialize (json_object *  jso, TPMS_PCR_SELECTION *  out)
Deserialize a TPMS_PCR_SELECTION variable.
Parameters:
in	jso 	json object to be deserialized. 	
out	out 	the deserialized object. 	
Return values:
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_RC ifapi_json_TPMS_PCRVALUE_deserialize (json_object *  jso, TPMS_PCRVALUE *  out)
Deserialize a TPMS_PCRVALUE json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_POLICY_deserialize (json_object *  jso, TPMS_POLICY *  out)
Deserialize a TPMS_POLICY json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_TPMS_POLICYACTION_deserialize (json_object *  jso, TPMS_POLICYACTION *  out)
Deserialize a TPMS_POLICYACTION json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_TPMS_POLICYAUTHORIZATION_deserialize (json_object *  jso, TPMS_POLICYAUTHORIZATION *  out)
Deserialize a TPMS_POLICYAUTHORIZATION json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_TPMS_POLICYAUTHORIZE_deserialize (json_object *  jso, TPMS_POLICYAUTHORIZE *  out)
Deserialize a TPMS_POLICYAUTHORIZE json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
< counter for conditional fields 
TSS2_RC ifapi_json_TPMS_POLICYAUTHORIZENV_deserialize (json_object *  jso, TPMS_POLICYAUTHORIZENV *  out)
Deserialize a TPMS_POLICYAUTHORIZENV json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
< counter for conditional fields 
TSS2_RC ifapi_json_TPMS_POLICYAUTHVALUE_deserialize (json_object *  jso, TPMS_POLICYAUTHVALUE *  out)
Deserialize a TPMS_POLICYAUTHVALUE json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPMS_POLICYBRANCH_deserialize (json_object *  jso, TPMS_POLICYBRANCH *  out)
Deserialize a TPMS_POLICYBRANCH json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_TPMS_POLICYCOMMANDCODE_deserialize (json_object *  jso, TPMS_POLICYCOMMANDCODE *  out)
Deserialize a TPMS_POLICYCOMMANDCODE json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_POLICYCOUNTERTIMER_deserialize (json_object *  jso, TPMS_POLICYCOUNTERTIMER *  out)
Deserialize a TPMS_POLICYCOUNTERTIMER json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_POLICYCPHASH_deserialize (json_object *  jso, TPMS_POLICYCPHASH *  out)
Deserialize a TPMS_POLICYCPHASH json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_POLICYDUPLICATIONSELECT_deserialize (json_object *  jso, TPMS_POLICYDUPLICATIONSELECT *  out)
Deserialize a TPMS_POLICYDUPLICATIONSELECT json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
< counter for conditional fields 
TSS2_RC ifapi_json_TPMS_POLICYLOCALITY_deserialize (json_object *  jso, TPMS_POLICYLOCALITY *  out)
Deserialize a TPMS_POLICYLOCALITY json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_POLICYNAMEHASH_deserialize (json_object *  jso, TPMS_POLICYNAMEHASH *  out)
Deserialize a TPMS_POLICYNAMEHASH json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
< counter for conditional fields 
TSS2_RC ifapi_json_TPMS_POLICYNV_deserialize (json_object *  jso, TPMS_POLICYNV *  out)
Deserialize a TPMS_POLICYNV json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
< counter for conditional fields 
TSS2_RC ifapi_json_TPMS_POLICYNVWRITTEN_deserialize (json_object *  jso, TPMS_POLICYNVWRITTEN *  out)
Deserialize a TPMS_POLICYNVWRITTEN json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_POLICYOR_deserialize (json_object *  jso, TPMS_POLICYOR *  out)
Deserialize a TPMS_POLICYOR json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_TPMS_POLICYPASSWORD_deserialize (json_object *  jso, TPMS_POLICYPASSWORD *  out)
Deserialize a TPMS_POLICYPASSWORD json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPMS_POLICYPCR_deserialize (json_object *  jso, TPMS_POLICYPCR *  out)
Deserialize a TPMS_POLICYPCR json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
< counter for conditional fields 
TSS2_RC ifapi_json_TPMS_POLICYPHYSICALPRESENCE_deserialize (json_object *  jso, TPMS_POLICYPHYSICALPRESENCE *  out)
Deserialize a TPMS_POLICYPHYSICALPRESENCE json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPMS_POLICYSECRET_deserialize (json_object *  jso, TPMS_POLICYSECRET *  out)
Deserialize a TPMS_POLICYSECRET json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
< counter for conditional fields 
TSS2_RC ifapi_json_TPMS_POLICYSIGNED_deserialize (json_object *  jso, TPMS_POLICYSIGNED *  out)
Deserialize a TPMS_POLICYSIGNED json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
< counter for conditional fields 
TSS2_RC ifapi_json_TPMS_POLICYTEMPLATE_deserialize (json_object *  jso, TPMS_POLICYTEMPLATE *  out)
Deserialize a TPMS_POLICYTEMPLATE json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
< counter for conditional fields 
TSS2_RC ifapi_json_TPMS_QUOTE_INFO_deserialize (json_object *  jso, TPMS_QUOTE_INFO *  out)
Deserialize a TPMS_QUOTE_INFO json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_RSA_PARMS_deserialize (json_object *  jso, TPMS_RSA_PARMS *  out)
Deserialize a TPMS_RSA_PARMS json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SCHEME_ECDAA_deserialize (json_object *  jso, TPMS_SCHEME_ECDAA *  out)
Deserialize a TPMS_SCHEME_ECDAA json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SCHEME_HASH_deserialize (json_object *  jso, TPMS_SCHEME_HASH *  out)
Deserialize a TPMS_SCHEME_HASH json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SCHEME_HMAC_deserialize (json_object *  jso, TPMS_SCHEME_HMAC *  out)
Deserialize a TPMS_SCHEME_HMAC json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SCHEME_KDF1_SP800_108_deserialize (json_object *  jso, TPMS_SCHEME_KDF1_SP800_108 *  out)
Deserialize a TPMS_SCHEME_KDF1_SP800_108 json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SCHEME_KDF1_SP800_56A_deserialize (json_object *  jso, TPMS_SCHEME_KDF1_SP800_56A *  out)
Deserialize a TPMS_SCHEME_KDF1_SP800_56A json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SCHEME_MGF1_deserialize (json_object *  jso, TPMS_SCHEME_MGF1 *  out)
Deserialize a TPMS_SCHEME_MGF1 json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SCHEME_XOR_deserialize (json_object *  jso, TPMS_SCHEME_XOR *  out)
Deserialize a TPMS_SCHEME_XOR json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SESSION_AUDIT_INFO_deserialize (json_object *  jso, TPMS_SESSION_AUDIT_INFO *  out)
Deserialize a TPMS_SESSION_AUDIT_INFO json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SIG_SCHEME_ECDAA_deserialize (json_object *  jso, TPMS_SIG_SCHEME_ECDAA *  out)
Deserialize a TPMS_SIG_SCHEME_ECDAA json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SIG_SCHEME_ECDSA_deserialize (json_object *  jso, TPMS_SIG_SCHEME_ECDSA *  out)
Deserialize a TPMS_SIG_SCHEME_ECDSA json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SIG_SCHEME_ECSCHNORR_deserialize (json_object *  jso, TPMS_SIG_SCHEME_ECSCHNORR *  out)
Deserialize a TPMS_SIG_SCHEME_ECSCHNORR json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SIG_SCHEME_RSAPSS_deserialize (json_object *  jso, TPMS_SIG_SCHEME_RSAPSS *  out)
Deserialize a TPMS_SIG_SCHEME_RSAPSS json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SIG_SCHEME_RSASSA_deserialize (json_object *  jso, TPMS_SIG_SCHEME_RSASSA *  out)
Deserialize a TPMS_SIG_SCHEME_RSASSA json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SIG_SCHEME_SM2_deserialize (json_object *  jso, TPMS_SIG_SCHEME_SM2 *  out)
Deserialize a TPMS_SIG_SCHEME_SM2 json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SIGNATURE_ECC_deserialize (json_object *  jso, TPMS_SIGNATURE_ECC *  out)
Deserialize a TPMS_SIGNATURE_ECC json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SIGNATURE_ECDAA_deserialize (json_object *  jso, TPMS_SIGNATURE_ECDAA *  out)
Deserialize a TPMS_SIGNATURE_ECDAA json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SIGNATURE_ECDSA_deserialize (json_object *  jso, TPMS_SIGNATURE_ECDSA *  out)
Deserialize a TPMS_SIGNATURE_ECDSA json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SIGNATURE_ECSCHNORR_deserialize (json_object *  jso, TPMS_SIGNATURE_ECSCHNORR *  out)
Deserialize a TPMS_SIGNATURE_ECSCHNORR json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SIGNATURE_RSA_deserialize (json_object *  jso, TPMS_SIGNATURE_RSA *  out)
Deserialize a TPMS_SIGNATURE_RSA json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SIGNATURE_RSAPSS_deserialize (json_object *  jso, TPMS_SIGNATURE_RSAPSS *  out)
Deserialize a TPMS_SIGNATURE_RSAPSS json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SIGNATURE_RSASSA_deserialize (json_object *  jso, TPMS_SIGNATURE_RSASSA *  out)
Deserialize a TPMS_SIGNATURE_RSASSA json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SIGNATURE_SM2_deserialize (json_object *  jso, TPMS_SIGNATURE_SM2 *  out)
Deserialize a TPMS_SIGNATURE_SM2 json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_SYMCIPHER_PARMS_deserialize (json_object *  jso, TPMS_SYMCIPHER_PARMS *  out)
Deserialize a TPMS_SYMCIPHER_PARMS json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_TIME_ATTEST_INFO_deserialize (json_object *  jso, TPMS_TIME_ATTEST_INFO *  out)
Deserialize a TPMS_TIME_ATTEST_INFO json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMS_TIME_INFO_deserialize (json_object *  jso, TPMS_TIME_INFO *  out)
Deserialize a TPMS_TIME_INFO json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMT_ECC_SCHEME_deserialize (json_object *  jso, TPMT_ECC_SCHEME *  out)
Deserialize a TPMT_ECC_SCHEME json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMT_HA_deserialize (json_object *  jso, TPMT_HA *  out)
Deserialize a TPMT_HA json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMT_KDF_SCHEME_deserialize (json_object *  jso, TPMT_KDF_SCHEME *  out)
Deserialize a TPMT_KDF_SCHEME json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMT_KEYEDHASH_SCHEME_deserialize (json_object *  jso, TPMT_KEYEDHASH_SCHEME *  out)
Deserialize a TPMT_KEYEDHASH_SCHEME json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMT_POLICYELEMENT_deserialize (json_object *  jso, TPMT_POLICYELEMENT *  out)
Deserialize a TPMT_POLICYELEMENT json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_TPMT_PUBLIC_deserialize (json_object *  jso, TPMT_PUBLIC *  out)
Deserialize a TPMT_PUBLIC json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMT_RSA_DECRYPT_deserialize (json_object *  jso, TPMT_RSA_DECRYPT *  out)
Deserialize a TPMT_RSA_DECRYPT json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMT_RSA_SCHEME_deserialize (json_object *  jso, TPMT_RSA_SCHEME *  out)
Deserialize a TPMT_RSA_SCHEME json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMT_SIG_SCHEME_deserialize (json_object *  jso, TPMT_SIG_SCHEME *  out)
Deserialize a TPMT_SIG_SCHEME json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMT_SIGNATURE_deserialize (json_object *  jso, TPMT_SIGNATURE *  out)
Deserialize a TPMT_SIGNATURE json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMT_SYM_DEF_deserialize (json_object *  jso, TPMT_SYM_DEF *  out)
Deserialize a TPMT_SYM_DEF json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMT_SYM_DEF_OBJECT_deserialize (json_object *  jso, TPMT_SYM_DEF_OBJECT *  out)
Deserialize a TPMT_SYM_DEF_OBJECT json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMT_TK_CREATION_deserialize (json_object *  jso, TPMT_TK_CREATION *  out)
Deserialize a TPMT_TK_CREATION json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMU_ASYM_SCHEME_deserialize (UINT32  selector, json_object *  jso, TPMU_ASYM_SCHEME *  out)
Deserialize a TPMU_ASYM_SCHEME json object.
This functions expects the Bitfield to be encoded as unsigned int in host-endianess. 
Parameters:
in	jso 	the json object to be deserialized. 	
in	selector 	The type the scheme. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMU_ATTEST_deserialize (UINT32  selector, json_object *  jso, TPMU_ATTEST *  out)
Deserialize a TPMU_ATTEST json object.
This functions expects the Bitfield to be encoded as unsigned int in host-endianess. 
Parameters:
in	selector 	The type the attest. 	
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMU_HA_deserialize (UINT32  selector, json_object *  jso, TPMU_HA *  out)
Deserialize a TPMU_HA json object.
This functions expects the Bitfield to be encoded as unsigned int in host-endianess. 
Parameters:
in	selector 	The type of the HA object. 	
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMU_KDF_SCHEME_deserialize (UINT32  selector, json_object *  jso, TPMU_KDF_SCHEME *  out)
Deserialize a TPMU_KDF_SCHEME json object.
This functions expects the Bitfield to be encoded as unsigned int in host-endianess. 
Parameters:
in	selector 	The type the KDF scheme. 	
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMU_POLICYELEMENT_deserialize (UINT32  selector, json_object *  jso, TPMU_POLICYELEMENT *  out)
Deserialize a TPMU_POLICYELEMENT json object.
This functions expects the Bitfield to be encoded as unsigned int in host-endianess. 
Parameters:
in	selector 	The type the policy element. 	
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_RC ifapi_json_TPMU_PUBLIC_ID_deserialize (UINT32  selector, json_object *  jso, TPMU_PUBLIC_ID *  out)
Deserialize a TPMU_PUBLIC_ID json object.
This functions expects the Bitfield to be encoded as unsigned int in host-endianess. 
Parameters:
in	selector 	The type the public ID. 	
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMU_PUBLIC_PARMS_deserialize (UINT32  selector, json_object *  jso, TPMU_PUBLIC_PARMS *  out)
Deserialize a TPMU_PUBLIC_PARMS json object.
This functions expects the Bitfield to be encoded as unsigned int in host-endianess. 
Parameters:
in	selector 	The type the public params. 	
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMU_SCHEME_KEYEDHASH_deserialize (UINT32  selector, json_object *  jso, TPMU_SCHEME_KEYEDHASH *  out)
Deserialize a TPMU_SCHEME_KEYEDHASH json object.
This functions expects the Bitfield to be encoded as unsigned int in host-endianess. 
Parameters:
in	selector 	The type the keyedhash scheme. 	
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMU_SIG_SCHEME_deserialize (UINT32  selector, json_object *  jso, TPMU_SIG_SCHEME *  out)
Deserialize a TPMU_SIG_SCHEME json object.
This functions expects the Bitfield to be encoded as unsigned int in host-endianess. 
Parameters:
in	selector 	The type the signature scheme. 	
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMU_SIGNATURE_deserialize (UINT32  selector, json_object *  jso, TPMU_SIGNATURE *  out)
Deserialize a TPMU_SIGNATURE json object.
This functions expects the Bitfield to be encoded as unsigned int in host-endianess. 
Parameters:
in	selector 	The type the signature. 	
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_FAPI_RC_BAD_REFERENCE 	a invalid null pointer is passed. 	
TSS2_RC ifapi_json_TPMU_SYM_KEY_BITS_deserialize (UINT32  selector, json_object *  jso, TPMU_SYM_KEY_BITS *  out)
Deserialize a TPMU_SYM_KEY_BITS json object.
This functions expects the Bitfield to be encoded as unsigned int in host-endianess. 
Parameters:
in	selector 	The type the symmetric algorithm. 	
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_TPMU_SYM_MODE_deserialize (UINT32  selector, json_object *  jso, TPMU_SYM_MODE *  out)
Deserialize a TPMU_SYM_MODE json object.
This functions expects the Bitfield to be encoded as unsigned int in host-endianess. 
Parameters:
in	selector 	The type the symmetric algorithm. 	
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_UINT16_deserialize (json_object *  jso, UINT16 *  out)
Deserialize a UINT16 json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_UINT32_deserialize (json_object *  jso, UINT32 *  out)
Deserialize a UINT32 json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_UINT64_deserialize (json_object *  jso, UINT64 *  out)
Deserialize a UINT64 json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	
TSS2_RC ifapi_json_UINT8_ARY_deserialize (json_object *  jso, UINT8_ARY *  out)
Deserialize an array of UINT8.
Parameters:
in	jso 	object to be deserialized. 	
out	out 	the deserialized object. 	
Return values:
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	
TSS2_FAPI_RC_BAD_VALUE 	if an invalid value was passed into the function. 	
TSS2_RC ifapi_json_UINT8_deserialize (json_object *  jso, UINT8 *  out)
Deserialize a UINT8 json object.
Parameters:
in	jso 	the json object to be deserialized. 	
out	out 	the deserialzed binary object. 	
Return values:
TSS2_RC_SUCCESS 	if the function call was a success. 	
TSS2_FAPI_RC_BAD_VALUE 	if the json object can't be deserialized. 	

Vendor specific module
Functions
TSS2_RC ifapi_get_intl_ek_certificate (FAPI_CONTEXT *context, TPM2B_PUBLIC *ek_public, unsigned char **cert_buffer, size_t *cert_size)

Detailed Description
Provides functions implementing vendor specific extensions. 

Function Documentation
TSS2_RC ifapi_get_intl_ek_certificate (FAPI_CONTEXT *  context, TPM2B_PUBLIC *  ek_public, unsigned char **  cert_buffer, size_t *  cert_size)
Get INTEL certificate for EK
Using the base64 encoded public endorsement key the JSON encoded certificate will be downloaded. The JSON certificate will be parsed and the base64 encoded certificate will be converted into binary format.
Parameters:
in	context 	The FAPI context with the configuration data. 	
in	ek_public 	The out public data of the EK. 	
out	cert_buffer 	the der encoded certificate. 	
out	cert_size 	The size of the certificate buffer.	
Return values:
TSS2_RC_SUCCESS 	on success. 	
TSS2_FAPI_RC_NO_CERT 	If an error did occur during certificate downloading. 	
TSS2_FAPI_RC_GENERAL_FAILURE 	if an internal error occured. 	
TSS2_FAPI_RC_MEMORY 	if not enough memory can be allocated. 	

Fapi-Testing
Functions
int test_fapi_data_crypt (FAPI_CONTEXT *context)
int test_fapi_duplicate (FAPI_CONTEXT *context)
int test_fapi_ext_public_key (FAPI_CONTEXT *context)
int test_fapi_get_random (FAPI_CONTEXT *context)
int test_fapi_info (FAPI_CONTEXT *context)
int test_fapi_key_change_auth (FAPI_CONTEXT *context)
int test_fapi_key_create_ckda_sign (FAPI_CONTEXT *context)
int test_fapi_key_create_policies_sign (FAPI_CONTEXT *context)
int test_fapi_key_create_policy_authorize_nv (FAPI_CONTEXT *context)
int test_fapi_key_create_policy_authorize_sign (FAPI_CONTEXT *context)
int test_fapi_key_create_policy_nv_sign (FAPI_CONTEXT *context)
int test_fapi_key_create_policy_or_sign (FAPI_CONTEXT *context)
int test_fapi_key_create_policy_pcr_sign (FAPI_CONTEXT *context)
int test_fapi_key_create_policy_secret_nv_sign (FAPI_CONTEXT *context)
int test_fapi_key_create_policy_signed (FAPI_CONTEXT *context)
int test_fapi_key_create_sign (FAPI_CONTEXT *context)
int test_fapi_key_create_sign_password_provision (FAPI_CONTEXT *context)
int test_fapi_key_create_sign_policy_provision (FAPI_CONTEXT *context)
int test_fapi_nv_extend (FAPI_CONTEXT *context)
int test_fapi_nv_increment (FAPI_CONTEXT *context)
int test_fapi_nv_ordinary (FAPI_CONTEXT *context)
int test_fapi_nv_set_bits (FAPI_CONTEXT *context)
int test_fapi_nv_written_policy (FAPI_CONTEXT *context)
int test_fapi_pcr_test (FAPI_CONTEXT *context)
int test_fapi_platform_certificates (FAPI_CONTEXT *context)
int test_fapi_quote (FAPI_CONTEXT *context)
int test_fapi_unseal (FAPI_CONTEXT *context)

Detailed Description
Testing of FAPI functionality. The tested FAPI functions are listed in each of the testcase functions' descriptions. 

Function Documentation
test_fapi_data_crypt (FAPI_CONTEXT *  context)
Test the FAPI functions for encryption and decryption.
Tested FAPI commands:
Fapi_Provision()
Fapi_Import()
Fapi_CreateKey()
Fapi_SetSignCB()
Fapi_Encrypt()
Fapi_Decrypt()
Fapi_Free()
Tested Policies:
PolicySigned
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_fapi_duplicate (FAPI_CONTEXT *  context)
Test the FAPI functions for key duplication.
Tested FAPI commands:
Fapi_Provision()
Fapi_Import()
Fapi_CreateKey()
Fapi_ExportKey()
Fapi_Delete()
Tested Policies:
PolicyDuplicationSelect
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_fapi_ext_public_key (FAPI_CONTEXT *  context)
Test the FAPI functions use an external public key for signature and quote verify without TPM.
Tested FAPI commands:
Fapi_Import()
Fapi_VerifySignature()
Fapi_SetCertificate()
Fapi_GetCertificate()
Fapi_List()
Fapi_VerifyQuote()
Fapi_Delete()
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_fapi_get_random (FAPI_CONTEXT *  context)
Test the FAPI function FAPI_GetRandom and async invocations.
Tested FAPI commands:
Fapi_Provision()
Fapi_GetRandom_Async()
Fapi_GetRandom_Finish()
Fapi_GetPollHandles()
Fapi_GetRandom()
Fapi_Delete()
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_fapi_info (FAPI_CONTEXT *  context)
Test the FAPI functions for GetInfo.
Tested FAPI commands:
Fapi_Provision()
Fapi_GetInfo()
Fapi_Delete()
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_fapi_key_change_auth (FAPI_CONTEXT *  context)
Test the FAPI function for changing key authorizations.
The setting of the authorization callback and usage of the key with Fapi_Sign afterwards is also tested.
Tested FAPI commands:
Fapi_Provision()
Fapi_CreateKey()
Fapi_ChangeAuth()
Fapi_SetAuthCB()
Fapi_Sign()
Fapi_Delete()
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_fapi_key_create_ckda_sign (FAPI_CONTEXT *  context)
Test the FAPI functions for key creation and usage with noda and da flag.
Tested FAPI commands:
Fapi_Provision()
Fapi_CreateKey()
Fapi_SetAuthCB()
Fapi_Sign()
Fapi_Delete()
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_fapi_key_create_policies_sign (FAPI_CONTEXT *  context)
Test several FAPI policies by usage of signing key.
Which test case will be executed is determined by the compiler switches: TEST_POLICY_PASSWORD, TEST_POLICY_AUTH_VALUE, TEST_POLICY_LOCALITY TEST_POLICY_PHYSICAL_PRESENCE, TEST_POLICY_COMMAND_CODE, TEST_POLICY_COUNTERTIMER.
Tested FAPI commands:
Fapi_Provision()
Fapi_Import()
Fapi_CreateKey()
Fapi_SetAuthCB()
Fapi_Sign()
Fapi_Delete()
Tested Policies:
PolicyPassword
PolicyAuthValue
PolicyLocality
PolicyPhysicalPresence
PolicyCommandCode
PolicyCounterTimer
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_fapi_key_create_policy_authorize_nv (FAPI_CONTEXT *  context)
Test the FAPI key signing with PolicyAuthorizeNV.
Tested FAPI commands:
Fapi_GetTcti()
Fapi_Provision()
Fapi_CreateNv()
Fapi_Import()
Fapi_WriteAuthorizeNv()
Fapi_CreateKey()
Fapi_Sign()
Fapi_Delete()
Tested Policies:
PolicyAuthorizeNv
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_fapi_key_create_policy_authorize_sign (FAPI_CONTEXT *  context)
Test the FAPI functions for PolicyAuthoirze with signing.
Tested FAPI commands:
Fapi_Provision()
Fapi_SetBranchCB()
Fapi_Import()
Fapi_CreateKey()
Fapi_AuthorizePolicy()
Fapi_Sign()
Fapi_List()
Fapi_Delete()
Tested Policies:
PolicyNameHash
PolicyAuthorize
PolicyCpHash (Not entered, only as alternative branch)
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_fapi_key_create_policy_nv_sign (FAPI_CONTEXT *  context)
Test the FAPI functions for NV writing and key usage.
Tested FAPI commands:
Fapi_Provision()
Fapi_CreateKey()
Fapi_NvWrite()
Fapi_Import()
Fapi_Sign()
Fapi_Delete()
Tested Policies:
PolicyNv
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_fapi_key_create_policy_or_sign (FAPI_CONTEXT *  context)
Test the FAPI for PolicyOr using signing.
Tested FAPI commands:
Fapi_Provision()
Fapi_Import()
Fapi_CreateKey()
Fapi_SetBranchCB()
Fapi_Sign()
Fapi_Delete()
Tested Policies:
PolicyOr
PolicyPcr
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_fapi_key_create_policy_pcr_sign (FAPI_CONTEXT *  context)
Test the FAPI functions for PolicyPCR with key creation and usage.
Tested FAPI commands:
Fapi_Provision()
Fapi_Import()
Fapi_CreateKey()
Fapi_Sign()
Fapi_ExportPolicy()
Fapi_Delete()
Fapi_Import()
Fapi_List()
Tested Policies:
PolicyPcr (with currentPCRs set)
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_fapi_key_create_policy_secret_nv_sign (FAPI_CONTEXT *  context)
Test the FAPI PolicySecret and PolicyAuthValue handling.
Tested FAPI commands:
Fapi_Provision()
Fapi_Import()
Fapi_CreateNv()
Fapi_CreateKey()
Fapi_Sign()
Fapi_SetAuthCB()
Fapi_Delete()
Tested Policies:
PolicySecret
PolicyAuthValue
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_fapi_key_create_policy_signed (FAPI_CONTEXT *  context)
Test the FAPI functions for key creation and usage with a PolicySigned.
Tested FAPI commands:
Fapi_Provision()
Fapi_Import()
Fapi_CreateKey()
Fapi_SetSignCB()
Fapi_Sign()
Fapi_Delete()
Fapi_List()
Tested Policies:
PolicySigned
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_fapi_key_create_sign (FAPI_CONTEXT *  context)
Test the FAPI functions for TpmBlobs and certificates.
Tested FAPI commands:
Fapi_Provision()
Fapi_SetAuthCB()
Fapi_CreateKey()
Fapi_GetTpmBlobs()
Fapi_Sign()
Fapi_VerifySignature()
Fapi_SetCertificate()
Fapi_List()
Fapi_ChangeAuth()
Fapi_Delete()
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_fapi_key_create_sign_password_provision (FAPI_CONTEXT *  context)
Test the FAPI functions for key creation and usage with an SH password.
Tested FAPI commands:
Fapi_Provision()
Fapi_SetAuthCB()
Fapi_CreateKey()
Fapi_GetTpmBlobs()
Fapi_Sign()
Fapi_SetCertificate()
Fapi_List()
Fapi_ChangeAuth()
Fapi_Delete()
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_fapi_key_create_sign_policy_provision (FAPI_CONTEXT *  context)
Test the FAPI functions for key creation and usage.
Tested FAPI commands:
Fapi_Provision()
Fapi_SetAuthCB()
Fapi_CreateKey()
Fapi_GetTpmBlobs()
Fapi_Sign()
Fapi_SetCertificate()
Fapi_List()
Fapi_Delete()
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_fapi_nv_extend (FAPI_CONTEXT *  context)
Test the FAPI function FAPI_NvExtend.
Tested FAPI commands:
Fapi_Provision()
Fapi_CreateNv()
Fapi_NvExtend()
Fapi_Delete()
Fapi_SetAuthCB()
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_fapi_nv_increment (FAPI_CONTEXT *  context)
Test the FAPI function FAPI_NvIncrement.
Tested FAPI commands:
Fapi_Provision()
Fapi_Import()
Fapi_CreateNv()
Fapi_SetAuthCB()
Fapi_ChangeAuth()
Fapi_Delete()
Fapi_NvIncrement()
Tested Policies:
PolicyAuthValue
PolicyCommandCode
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_fapi_nv_ordinary (FAPI_CONTEXT *  context)
Test the FAPI NV functions.
Tested FAPI commands:
Fapi_Provision()
Fapi_Import()
Fapi_SetPolicyActionCB()
Fapi_CreateNv()
Fapi_NvWrite()
Fapi_NvRead()
Fapi_Delete()
Fapi_SetDescription()
Fapi_GetDescription()
Fapi_SetAuthCB()
Tested Policies:
PolicyAction
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_fapi_nv_set_bits (FAPI_CONTEXT *  context)
Test the FAPI function Fapi_NvSetBits.
Tested FAPI commands:
Fapi_Provision()
Fapi_CreateNv()
Fapi_NvSetBits()
Fapi_Delete()
Fapi_SetAuthCB()
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_fapi_nv_written_policy (FAPI_CONTEXT *  context)
Test the FAPI policy PolicyNvWritten.
Tested FAPI commands:
Fapi_Provision()
Fapi_CreateNv()
Fapi_SetAppData()
Fapi_GetAppData()
Fapi_NvWrite()
Fapi_Delete()
Tested Policies:
PolicyNvWritten
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_fapi_pcr_test (FAPI_CONTEXT *  context)
Test the FAPI function FAPI_PcrExtend and Read.
Tested FAPI commands:
Fapi_Provision()
Fapi_PcrExtend()
Fapi_PcrRead()
Fapi_Delete()
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_fapi_platform_certificates (FAPI_CONTEXT *  context)
Test the FAPI functions for platform certificates.
Tested FAPI commands:
Fapi_Provision()
Fapi_GetPlatformCertificates()
Fapi_Delete()
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_fapi_quote (FAPI_CONTEXT *  context)
Test the FAPI functions for quote commands.
Tested FAPI commands:
Fapi_Provision()
Fapi_CreateKey()
Fapi_PcrExtend()
Fapi_Quote()
Fapi_ExportKey()
Fapi_Import()
Fapi_PcrRead()
Fapi_VerifyQuote()
Fapi_List()
Fapi_Delete()
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		
test_fapi_unseal (FAPI_CONTEXT *  context)
Test the FAPI functions for sealing.
Tested FAPI commands:
Fapi_Provision()
Fapi_CreateSeal()
Fapi_Unseal()
Fapi_Delete()
Parameters:
in,out	context 	The FAPI_CONTEXT. 	
Return values:
EXIT_FAILURE 		
EXIT_SUCCESS 		

Data Structure Documentation
_IESYS_CRYPTO_CONTEXT Struct Reference
Public Types
enum { IESYS_CRYPTMBED_TYPE_HASH = 1, IESYS_CRYPTMBED_TYPE_HMAC }
enum { IESYS_CRYPTOSSL_TYPE_HASH = 1, IESYS_CRYPTOSSL_TYPE_HMAC }
Data Fields
enum _IESYS_CRYPTO_CONTEXT:: { ... }  type
union {
  struct {
    mbedtls_md_context_t mbed_context
    size_t hash_len
  } hash
  struct {
    mbedtls_md_context_t mbed_context
    size_t hmac_len
  } hmac
}; 
enum _IESYS_CRYPTO_CONTEXT:: { ... }  type
union {
  struct {
    const EVP_MD * ossl_hash_alg
    EVP_MD_CTX * ossl_context
    size_t hash_len
  } hash
}; 

Detailed Description
Context to hold temporary values for iesys_crypto 

Field Documentation
struct { ... }   hash
the state variables for a hash context 
struct { ... }   hash
the state variables for a HASH or HMAC context 
struct { ... }   hmac
the state variables for an hmac context 
enum { ... }   type
The type of context to hold; hash or hmac 
enum { ... }   type
The type of context to hold; hash or hmac 

The documentation for this struct was generated from the following files:
src/tss2-esys/esys_crypto_mbed.c
src/tss2-esys/esys_crypto_ossl.c

_IFAPI_CRYPTO_CONTEXT Struct Reference
Data Fields
const EVP_MD * osslHashAlgorithm
EVP_MD_CTX * osslContext
size_t hashSize

Detailed Description
Context to hold temporary values for ifapi_crypto 

Field Documentation
size_t hashSize
The size of the hash's digest 
EVP_MD_CTX* osslContext
The hash engine's context 
const EVP_MD* osslHashAlgorithm
The currently used hash algorithm 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_crypto.c

_IFAPI_OBJECT Struct Reference

#include <ifapi_keystore.h>
Data Fields
TPMS_POLICY * policy
IFAPI_OBJECT_TYPE_CONSTANT objectType
IFAPI_OBJECT_UNION misc
TPMI_YES_NO system
ESYS_TR handle
enum IFAPI_AUTHORIZATION_STATE authorization_state
enum IFAPI_IO_STATE state
const char * rel_path

Detailed Description
Type for representing TPM-Resource 

Field Documentation
enum IFAPI_AUTHORIZATION_STATE authorization_state
State of object authorization state machine 
ESYS_TR handle
Handle used by ESAPI 
IFAPI_OBJECT_UNION misc
Resource specific information 
IFAPI_OBJECT_TYPE_CONSTANT objectType
Selector for object type 
const char* rel_path
The relative path in keystore. 
TPMI_YES_NO system
Store the object in the system wide directory 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_keystore.h

CurlBufferStruct Struct Reference
Data Fields
unsigned char * buffer
size_t size

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_helpers.c

FAPI_CONTEXT Struct Reference

#include <fapi_int.h>
Data Fields
ESYS_CONTEXT * esys
struct IFAPI_CALLBACKS callbacks
struct IFAPI_IO io
struct IFAPI_EVENTLOG eventlog
struct IFAPI_KEYSTORE keystore
struct IFAPI_POLICY_STORE pstore
struct IFAPI_PROFILES profiles
TPMS_TIME_INFO init_time
enum _FAPI_STATE state
enum _FAPI_STATE_PRIMARY primary_state
enum _FAPI_STATE_SESSION session_state
enum _FAPI_STATE_GET_RANDOM get_random_state
enum IFAPI_HIERACHY_AUTHORIZATION_STATE hierarchy_state
enum IFAPI_HIERACHY_POLICY_AUTHORIZATION_STATE hierarchy_policy_state
enum IFAPI_GET_CERT_STATE get_cert_state
enum _FAPI_FLUSH_STATE flush_object_state
enum IFAPI_CLEANUP_STATE cleanup_state
IFAPI_CONFIG config
UINT32 nv_buffer_max
IFAPI_CMD_STATE cmd
IFAPI_NV_Cmds nv_cmd
IFAPI_GetRandom get_random
IFAPI_CreatePrimary createPrimary
IFAPI_LoadKey loadKey
ESYS_TR session1
ESYS_TR session2
ESYS_TR policy_session
ESYS_TR ek_handle
ESYS_TR srk_handle
TPMI_DH_PERSISTENT ek_persistent
TPMI_DH_PERSISTENT srk_persistent
IFAPI_SESSION_TYPE session_flags
TPMA_SESSION session1_attribute_flags
TPMA_SESSION session2_attribute_flags
IFAPI_MAX_BUFFER aux_data
IFAPI_POLICY_CTX policy
IFAPI_FILE_SEARCH_CTX fsearch
IFAPI_Key_Sign Key_Sign
enum IFAPI_IO_STATE io_state
NODE_OBJECT_T * object_list
IFAPI_OBJECT * duplicate_key
IFAPI_OBJECT * current_auth_object

Detailed Description
The data structure holding internal state information.
Each FAPI_CONTEXT respresents a logically independent connection to the TPM. It stores meta data information about object in order to calculate session auths and similar things. 

Field Documentation
IFAPI_MAX_BUFFER aux_data
tpm2b data to be transferred 
struct IFAPI_CALLBACKS callbacks
Callbacks for user interaction from FAPI 
enum IFAPI_CLEANUP_STATE cleanup_state
The state of cleanup after command execution 
IFAPI_CMD_STATE cmd
The state information of the currently executed command 
IFAPI_CONFIG config
The profile independent configuration data 
IFAPI_OBJECT* duplicate_key
Will be needed for policy execution 
ESYS_CONTEXT* esys
The ESYS context used internally to talk to the TPM. 
enum _FAPI_FLUSH_STATE flush_object_state
The current state of a flush operation 
IFAPI_FILE_SEARCH_CTX fsearch
The context for object search in key/policy store 
enum _FAPI_STATE_GET_RANDOM get_random_state
The current state of get random 
TPMS_TIME_INFO init_time
The current time during FAPI initialization. 
IFAPI_Key_Sign Key_Sign
State information for key signing 
UINT32 nv_buffer_max
The maximal size for transfer of nv buffer content 
IFAPI_POLICY_CTX policy
The context of current policy. 
ESYS_TR policy_session
The policy session used by FAPI 
enum _FAPI_STATE_PRIMARY primary_state
The current state of the primary regeneration 
ESYS_TR session1
The first session used by FAPI 
ESYS_TR session2
The second session used by FAPI 
enum _FAPI_STATE_SESSION session_state
The current state of the session creation 
enum _FAPI_STATE state
The current state of the command execution 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

FAPI_QUOTE_INFO Struct Reference

#include <fapi_int.h>
Data Fields
TPMT_SIG_SCHEME sig_scheme
TPMS_ATTEST attest

Detailed Description
Type for representing a external public key 

Field Documentation
TPMS_ATTEST attest
Attestation data from Quote 
TPMT_SIG_SCHEME sig_scheme
Signature scheme used for quote. 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_api_WriteAuthorizeNv Struct Reference

#include <fapi_int.h>
Data Fields
const char * policyPath
TPMI_ALG_HASH * hash_alg
size_t hash_size
size_t digest_idx

Detailed Description
The data structure holding internal state of Fapi_WriteAuthorizeNv. 

Field Documentation
size_t digest_idx
The index of the digest in the policy 
TPMI_ALG_HASH* hash_alg
The hash alg used for digest computation 
size_t hash_size
The digest size 
const char* policyPath
Policy with Policy to be authorized 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_CALLBACKS Struct Reference

#include <fapi_int.h>
Data Fields
Fapi_CB_Auth auth
void * authData
Fapi_CB_Branch branch
void * branchData
Fapi_CB_Sign sign
void * signData
Fapi_CB_PolicyAction action
void * actionData

Detailed Description
Structure holding FAPI callbacks and userData
This structure holds the callback pointers and corresponding userData pointers for each of the three callback types of FAPI. They are set using Fapi_SetAuthCB, Fapi_SetBranchCB and Fapi_SetSignCB. 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_CAP_INFO Struct Reference
Data Fields
char * description
TPMS_CAPABILITY_DATA * capability

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_CMD_STATE Union Reference

#include <fapi_int.h>
Data Fields
IFAPI_Provision Provision
IFAPI_Key_Create Key_Create
IFAPI_Key_SetCertificate Key_SetCertificate
IFAPI_Entity_ChangeAuth Entity_ChangeAuth
IFAPI_Entity_Delete Entity_Delete
IFAPI_GetEsysBlob GetEsysBlob
IFAPI_Entities_List Entities_List
IFAPI_Key_VerifySignature Key_VerifySignature
IFAPI_Data_EncryptDecrypt Data_EncryptDecrypt
IFAPI_PCR pcr
IFAPI_INITIALIZE Initialize
IFAPI_Path_SetDescription path_set_info
IFAPI_Fapi_AuthorizePolicy Policy_AuthorizeNewPolicy
IFAPI_api_WriteAuthorizeNv WriteAuthorizeNV
IFAPI_ExportKey ExportKey
IFAPI_ImportKey ImportKey
IFAPI_Unseal Unseal
IFAPI_GetInfo GetInfo
IFAPI_ExportPolicy ExportPolicy

Detailed Description
Union for all input parameters.
The input parameters of a command need to be stored in order to enable resubmission. This type provides the corresponding facilities. 

The documentation for this union was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_CONFIG Struct Reference

#include <ifapi_config.h>
Data Fields
char * profile_dir
char * user_dir
char * keystore_dir
char * profile_name
char * tcti
char * log_dir
TPML_PCR_SELECTION system_pcrs
TPMT_HA ek_fingerprint
char * ek_cert_file
TPMI_YES_NO ek_cert_less
char * intel_cert_service

Detailed Description
Type for storing FAPI configuration 

Field Documentation
TPMT_HA ek_fingerprint
Fingerprint of EK 
char* intel_cert_service
Certificate service for Intel TPMs 
char* keystore_dir
Directory storing key and NV objects 
char* log_dir
The directory for event logs 
char* profile_dir
Path for profile directory 
char* profile_name
Name the used profile 
TPML_PCR_SELECTION system_pcrs
The PCRs used by IMA etc. 
char* tcti
The used tcti interface 
char* user_dir
Directory storing NV objects 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_config.h

IFAPI_CreatePrimary Struct Reference

#include <fapi_int.h>
Data Fields
char * path
IFAPI_OBJECT hierarchy
IFAPI_OBJECT pkey_object
TPM2B_SENSITIVE_CREATE inSensitive
TPM2B_DATA outsideInfo
TPML_PCR_SELECTION creationPCR
ESYS_TR handle
TPMI_DH_PERSISTENT persistent_handle
TPMS_CAPABILITY_DATA * capabilityData

Detailed Description
The data structure holding internal state of regenerate primary key. 

Field Documentation
IFAPI_OBJECT hierarchy
The current used hierarchy for CreatePrimary 
char* path
Path of the primary (starting with hierarchy) 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_Data_EncryptDecrypt Struct Reference

#include <fapi_int.h>
Data Fields
char const  * keyPath
uint8_t const  * in_data
size_t in_dataSize
IFAPI_OBJECT * key_object
ESYS_TR key_handle
size_t numBytes
size_t decrypt
UINT16 bytesRequested
TPMT_RSA_DECRYPT rsa_scheme
ESYS_TR object_handle
char * policy_path
ESYS_TR auth_session
const IFAPI_PROFILE * profile
uint8_t * plainText
size_t plainTextSize
uint8_t * cipherText
size_t cipherTextSize

Detailed Description
The data structure holding internal state of Fapi_EncryptDecrypt. 

Field Documentation
UINT16 bytesRequested
Bytes currently requested from TPM 
size_t decrypt
Switch whether to encrypt or decrypt 
ESYS_TR key_handle
The ESYS handle of the encryption key 
IFAPI_OBJECT* key_object
The IPAPI object for the encryption key 
char const* keyPath
The implicit key path 
size_t numBytes
The number of bytes of a ESYS request 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_DUPLICATE Struct Reference

#include <ifapi_keystore.h>
Data Fields
TPM2B_PRIVATE duplicate
TPM2B_ENCRYPTED_SECRET encrypted_seed
TPM2B_PUBLIC public
TPM2B_PUBLIC public_parent
char * certificate
TPMS_POLICY * policy

Detailed Description
Type for representing a FAPI object for key duplication. 

Field Documentation
char* certificate
The certificate of the key to be duplicated 
TPM2B_PRIVATE duplicate
The duplicate of the key to export 
TPM2B_ENCRYPTED_SECRET encrypted_seed
Encrypted seed needed for key import 
TPMS_POLICY* policy
The policy of the key to be duplicated 
TPM2B_PUBLIC public
The public information of the key to be duplicated 
TPM2B_PUBLIC public_parent
The public information of the new parent key 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_keystore.h

IFAPI_Entities_List Struct Reference

#include <fapi_int.h>
Data Fields
const char * searchPath

Detailed Description
The data structure holding internal state of list entities. 

Field Documentation
const char* searchPath
The path to searched for objectws 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_Entity_ChangeAuth Struct Reference

#include <fapi_int.h>
Data Fields
const char * entityPath
ESYS_TR handle
IFAPI_OBJECT * key_object
const char * authValue
TPM2B_AUTH newAuthValue
TPM2B_PRIVATE * newPrivate
IFAPI_OBJECT object
ESYS_TR nv_index
ESYS_TR hierarchy_handle

Detailed Description
The data structure holding internal state of Fapi_ChangeAuth. 

Field Documentation
const char* authValue
The new auth value 
const char* entityPath
The implicit key path 
ESYS_TR handle
The ESYS handle of the key 
ESYS_TR hierarchy_handle
NV handle of the hierarchy to be changed 
IFAPI_OBJECT* key_object
The IPAPI object of the key 
TPM2B_AUTH newAuthValue
The new auth value 
TPM2B_PRIVATE* newPrivate
New private data created by parend 
ESYS_TR nv_index
NV handle of the object to be changed 
IFAPI_OBJECT object
Deserialized NV object or hierarchy 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_Entity_Delete Struct Reference

#include <fapi_int.h>
Data Fields
bool is_key
bool is_persistent_key
ESYS_TR new_object_handle
TPM2_HANDLE permanentHandle
IFAPI_OBJECT auth_object
ESYS_TR auth_index
char * path
IFAPI_OBJECT object
char ** pathlist
size_t numPaths
size_t path_idx

Detailed Description
The data structure holding internal state of entity delete. 

Field Documentation
ESYS_TR auth_index
The ESAPI handle of the nv authorization object 
IFAPI_OBJECT auth_object
Object used for authentication 
bool is_key
Entity to be deleted is a key 
bool is_persistent_key
Entity to be deleted is a key 
size_t numPaths
Size of array with the object files to be deleted 
IFAPI_OBJECT object
Deserialized object 
char* path
The name of the file to be deleted 
size_t path_idx
Index of array with the object files to be deleted 
char** pathlist
The array with the object files to be deleted 
TPM2_HANDLE permanentHandle
The TPM permanent handle 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_EVENT Struct Reference

#include <ifapi_eventlog.h>
Data Fields
UINT32 recnum
TPM2_HANDLE pcr
TPML_DIGEST_VALUES digests
IFAPI_EVENT_TYPE type
IFAPI_EVENT_UNION sub_event

Detailed Description
Type for representing a FAPI event 

Field Documentation
TPML_DIGEST_VALUES digests
The digest list of the event 
TPM2_HANDLE pcr
PCR register 
UINT32 recnum
Number of event 
IFAPI_EVENT_UNION sub_event
Additional event information 
IFAPI_EVENT_TYPE type
Selector for object type 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_eventlog.h

IFAPI_EVENT_TYPE_ASSIGN Struct Reference
Data Fields
IFAPI_EVENT_TYPE in
char * name

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_json_serialize.c

IFAPI_EVENT_UNION Union Reference

#include <ifapi_eventlog.h>
Data Fields
IFAPI_TSS_EVENT tss_event
IFAPI_IMA_EVENT ima_event

Detailed Description
Type for representing sub types of FAPI events 

Field Documentation
IFAPI_IMA_EVENT ima_event
IMA event information 
IFAPI_TSS_EVENT tss_event
TSS event information 

The documentation for this union was generated from the following file:
src/tss2-fapi/ifapi_eventlog.h

IFAPI_EVENTLOG Struct Reference
Data Fields
enum IFAPI_EVENTLOG_STATE state
char * log_dir
struct IFAPI_EVENT event
TPM2_HANDLE pcrList [TPM2_MAX_PCRS]
size_t pcrListSize
size_t pcrListIdx
json_object * log

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_eventlog.h

IFAPI_ExportKey Struct Reference

#include <fapi_int.h>
Data Fields
char const  * pathOfKeyToDuplicate
char const  * pathToPublicKeyOfNewParent
TPM2B_PUBLIC public_parent
IFAPI_OBJECT * key_object
IFAPI_OBJECT export_tree
IFAPI_OBJECT pub_key
IFAPI_OBJECT dup_key
struct TPMS_POLICY policy
ESYS_TR handle_ext_key
char * exportedData

Detailed Description
The data structure holding internal state of export key. 

Field Documentation
IFAPI_OBJECT dup_key
The key to be duplicated or exported 
IFAPI_OBJECT export_tree
The complete tree to be exported 
IFAPI_OBJECT* key_object
The IPAPI object of the key to be duplicated 
char const* pathOfKeyToDuplicate
The relative path of the key to be exported 
char const* pathToPublicKeyOfNewParent
The relative path of the new parent 
IFAPI_OBJECT pub_key
The public part of the new parent 
TPM2B_PUBLIC public_parent
The public key of the new parent 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_ExportPolicy Struct Reference

#include <fapi_int.h>
Data Fields
char const  * path
IFAPI_OBJECT object
TPMS_POLICY policy
TPMI_ALG_HASH hashAlg
size_t profile_idx
bool compute_policy

Detailed Description
The data structure holding internal state of export policy. 

Field Documentation
bool compute_policy
Switch whether computation of the policy for the default name hash alg is needed. 
TPMI_ALG_HASH hashAlg
Index of profile used for digest computation. 
IFAPI_OBJECT object
Object corresponding to path 
char const* path
Path of the object with the policy to be exported 
TPMS_POLICY policy
Policy from store be exported 
size_t profile_idx
hashAlg used for policy digest computation. 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_EXT_PUB_KEY Struct Reference

#include <ifapi_keystore.h>
Data Fields
char * pem_ext_public
char * certificate
TPM2B_PUBLIC public

Detailed Description
Type for representing a external public key 

Field Documentation
char* certificate
Keys certificate (if any) 
char* pem_ext_public
Public key in PEM format 
TPM2B_PUBLIC public
The pulic information in TPM format 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_keystore.h

IFAPI_Fapi_AuthorizePolicy Struct Reference

#include <fapi_int.h>
Data Fields
const char * policyPath
const char * signingKeyPath
TPM2B_DIGEST policyRef
TPMS_POLICYAUTHORIZATION authorization

Detailed Description
The data structure holding internal state of Fapi_AuthorizePolicy. 

Field Documentation
const char* policyPath
Policy with Policy to be authorized 
const char* signingKeyPath
Key for policy signing 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_FILE_SEARCH_CTX Struct Reference

#include <fapi_int.h>
Data Fields
enum IFAPI_STATE_FILE_SEARCH state
char ** pathlist
size_t path_idx
size_t numPaths
char * current_path

Detailed Description
The data structure holding internal policy state. 

Field Documentation
size_t numPaths
Number of all objects in data store 
size_t path_idx
Index of array of objects to be searched 
char** pathlist
The array of all objects in the search path 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_GetEsysBlob Struct Reference

#include <fapi_int.h>
Data Fields
uint8_t type
uint8_t * data
size_t length
bool is_key
bool is_persistent_key
ESYS_TR new_object_handle
TPM2_HANDLE permanentHandle
IFAPI_OBJECT auth_object
ESYS_TR auth_index
char * path
IFAPI_OBJECT object
IFAPI_OBJECT * key_object

Detailed Description
The data structure holding internal state of esys get blob. 

Field Documentation
ESYS_TR auth_index
The ESAPI handle of the nv authorization object 
IFAPI_OBJECT auth_object
Object used for authentication 
uint8_t* data
data of the blob to be returned 
bool is_key
Object is a key 
bool is_persistent_key
Object is a persistent key 
IFAPI_OBJECT* key_object
Loaded key object 
size_t length
The size of the data to be returned 
IFAPI_OBJECT object
Deserialized object 
char* path
The path of the object 
TPM2_HANDLE permanentHandle
The TPM permanent handle 
uint8_t type
type of blob to be returned 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_GetInfo Struct Reference

#include <fapi_int.h>
Data Fields
TPMS_CAPABILITY_DATA * capability_data
TPMS_CAPABILITY_DATA * fetched_data
size_t idx_info_cap
IFAPI_INFO info_obj
UINT32 property_count
UINT32 property

Detailed Description
The data structure holding internal state of Fapi_GetInfo. 

Field Documentation
TPMS_CAPABILITY_DATA* capability_data
The TPM capability for one property 
TPMS_CAPABILITY_DATA* fetched_data
The data fetched in one TPM command 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_GetRandom Struct Reference

#include <fapi_int.h>
Data Fields
size_t numBytes
size_t idx
UINT16 bytesRequested
uint8_t * data
uint8_t * ret_data

Detailed Description
The data structure holding internal state of Fapi_GetRandom. 

Field Documentation
UINT16 bytesRequested
Byted currently requested from TPM 
uint8_t* data
The buffer for the random data 
size_t idx
Current position in output buffer. 
size_t numBytes
The number of random bytes to be generated 
uint8_t* ret_data
The result buffer. 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_HIERARCHY Struct Reference

#include <ifapi_keystore.h>
Data Fields
TPMI_YES_NO with_auth
char * description
TPM2B_DIGEST authPolicy
ESYS_TR esysHandle
bool authorized
TPM2B_NAME name

Detailed Description
Type for representing hierarchy 

Field Documentation
bool authorized
Switch whether hiearchy is authorized. 
char* description
Human readable description of hierarchy 
TPM2B_NAME name
Name of the hierarchy 
TPMI_YES_NO with_auth
Authorization provided 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_keystore.h

IFAPI_IFAPI_EVENT_TYPE_ASSIGN Struct Reference
Data Fields
IFAPI_EVENT_TYPE in
char * name

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_json_deserialize.c

IFAPI_IMA_EVENT Struct Reference

#include <ifapi_eventlog.h>
Data Fields
TPM2B_DIGEST eventData
char * eventName

Detailed Description
IMA event information 

Field Documentation
TPM2B_DIGEST eventData
The ima event digest 
char* eventName
IMA event information 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_eventlog.h

IFAPI_ImportKey Struct Reference

#include <fapi_int.h>
Data Fields
IFAPI_OBJECT object
TPM2B_NAME parent_name
IFAPI_OBJECT * parent_object
IFAPI_OBJECT new_object
char * parent_path
char * out_path
TPM2B_PRIVATE * private
char * jso_string
const IFAPI_PROFILE * profile

Detailed Description
The data structure holding internal state of import key. 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_INFO Struct Reference
Data Fields
char * fapi_version
IFAPI_CONFIG fapi_config
IFAPI_CAP_INFO cap [IFAPI_MAX_CAP_INFO]

Field Documentation
IFAPI_CONFIG fapi_config
The configuration information 
char* fapi_version
The version string of FAPI 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_INFO_CAP Struct Reference
Data Fields
char * description
TPMI_POLICYTYPE capability
UINT32 property
UINT32 max

The documentation for this struct was generated from the following file:
src/tss2-fapi/api/Fapi_GetInfo.c

IFAPI_INITIALIZE Struct Reference

#include <fapi_int.h>
Data Fields
TPMS_CAPABILITY_DATA * capability
char ** pathlist
size_t numPaths
size_t numNullPrimaries
size_t primary_idx
size_t path_idx
IFAPI_OBJECT * null_primaries

Detailed Description
The data structure holding internal state of Fapi_Initialize command. 

Field Documentation
IFAPI_OBJECT* null_primaries
Array of the NULL hierarchy primaries. 
size_t numNullPrimaries
Number of NULL hierarchy primaries stored in keystore 
size_t numPaths
Size of array with all keystore objects 
size_t path_idx
Index of array with the object paths 
char** pathlist
The array with all keystore objects 
size_t primary_idx
Index to the current primary 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_IO Struct Reference
Data Fields
FILE * stream
short pollevents
const char * char_buffer
char * char_rbuffer
size_t buffer_length
size_t buffer_idx

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_io.h

IFAPI_KEY Struct Reference

#include <ifapi_keystore.h>
Data Fields
UINT32 persistent_handle
TPM2B_PUBLIC public
UINT8_ARY serialization
UINT8_ARY private
char * policyInstance
TPM2B_CREATION_DATA creationData
TPMT_TK_CREATION creationTicket
char * description
UINT8_ARY appData
char * certificate
TPMT_SIG_SCHEME signing_scheme
TPM2B_NAME name
TPMI_YES_NO with_auth
UINT32 reset_count
TPMI_YES_NO delete_prohibited

Detailed Description
Type for representing a FAPI key 

Field Documentation
UINT8_ARY appData
Application data 
char* certificate
Keys certificate (if any) 
TPM2B_CREATION_DATA creationData
None 
TPMT_TK_CREATION creationTicket
None 
TPMI_YES_NO delete_prohibited
Persistent object should not be deleted. 
char* description
Human readable description of key 
TPM2B_NAME name
Name of the key 
UINT32 persistent_handle
Persistent TPM Handle 
char* policyInstance
Keys policy 
UINT8_ARY private
None 
TPM2B_PUBLIC public
The wrapped public portion of the object 
UINT32 reset_count
The TPM reset count during key creation 
UINT8_ARY serialization
None 
TPMT_SIG_SCHEME signing_scheme
Signing scheme for the key 
TPMI_YES_NO with_auth
Authorization provided during creation 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_keystore.h

IFAPI_Key_Create Struct Reference

#include <fapi_int.h>
Data Fields
enum IFAPI_KEY_CREATE_STATE state
const char * keyPath
NODE_STR_T * path_list
IFAPI_OBJECT parent
IFAPI_OBJECT object
IFAPI_KEY_TEMPLATE public_templ
TPM2B_PUBLIC public
IFAPI_OBJECT hierarchy
TPM2B_SENSITIVE_CREATE inSensitive
TPM2B_DATA outsideInfo
TPML_PCR_SELECTION creationPCR
ESYS_TR handle
const char * authValue
const char * policyPath
const IFAPI_PROFILE * profile
bool gen_sensitive_random

Detailed Description
The data structure holding internal state of Fapi_CreateKey. 

Field Documentation
bool gen_sensitive_random
Switch whether sensitive ransom data has to be created. 
IFAPI_OBJECT hierarchy
The current used hierarchy for CreatePrimary 
const char* keyPath
The pathname from the application 
IFAPI_OBJECT object
The current object. 
IFAPI_OBJECT parent
The parent of the key for used for creation. 
NODE_STR_T* path_list
The computed explicit path 
TPM2B_PUBLIC public
The public data of the key 
IFAPI_KEY_TEMPLATE public_templ
The template for the keys public data 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_KEY_SEARCH Struct Reference

#include <ifapi_keystore.h>
Data Fields
size_t path_idx
size_t numPaths
char ** pathlist
enum FAPI_SEARCH_STATE state

Detailed Description
The data structure holding internal state for key searching. 

Field Documentation
size_t numPaths
Number of all objects in data store 
size_t path_idx
Index of array of objects to be searched 
char** pathlist
The array of all objects in the search path 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_keystore.h

IFAPI_Key_SetCertificate Struct Reference

#include <fapi_int.h>
Data Fields
const char * pem_cert
char * pem_cert_dup
const char * key_path
NODE_STR_T * path_list
IFAPI_OBJECT key_object

Detailed Description
The data structure holding internal state of Fapi_Key_Setcertificate. 

Field Documentation
IFAPI_OBJECT key_object
The IPAPI object for the certified key 
const char* key_path
The absolute key path 
NODE_STR_T* path_list
The computed explicit path 
const char* pem_cert
The certifificate in pem or format 
char* pem_cert_dup
The allocate certifificate 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_Key_Sign Struct Reference

#include <fapi_int.h>
Data Fields
enum FAPI_SIGN_STATE state
const char * keyPath
ESYS_TR handle
TPM2B_DIGEST digest
TPMT_SIG_SCHEME scheme
IFAPI_OBJECT * key_object
TPMT_SIGNATURE * tpm_signature
TPMI_YES_NO decrypt
TPMT_SIGNATURE * signature
char const  * padding
char * certificate
uint8_t * ret_signature
size_t signatureSize
char * publicKey

Detailed Description
The data structure holding internal state of Fapi_Sign. 

Field Documentation
char* certificate
Certificate of the signing key. 
TPMI_YES_NO decrypt
Switch for symmetric algs 
TPM2B_DIGEST digest
The digest to be signed 
ESYS_TR handle
The ESYS handle of the signing key 
IFAPI_OBJECT* key_object
The IPAPI object of the signing key 
const char* keyPath
The implicit key path 
char const* padding
Optional padding parameter for key sign. 
char* publicKey
Public key of the signing key. 
uint8_t* ret_signature
Result signature 
TPMT_SIG_SCHEME scheme
The signature scheme from profile 
TPMT_SIGNATURE* signature
Produced TPM singature 
enum FAPI_SIGN_STATE state
The state of the signing operation 
TPMT_SIGNATURE* tpm_signature
The signature in TPM format 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_KEY_TEMPLATE Struct Reference

#include <fapi_int.h>
Data Fields
TPMI_YES_NO system
TPMI_YES_NO persistent
UINT32 persistent_handle
TPM2B_PUBLIC public

Detailed Description
Type for representing FAPI template for keys 

Field Documentation
TPMI_YES_NO persistent
Store key persistent in NV ram. 
UINT32 persistent_handle
< Persistent handle which should be used 
TPM2B_PUBLIC public
Template for public data 
TPMI_YES_NO system
Store the object in the system wide directory 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_Key_VerifySignature Struct Reference

#include <fapi_int.h>
Data Fields
const char * keyPath
uint8_t const  * signature
size_t signatureSize
uint8_t const  * digest
size_t digestSize
IFAPI_OBJECT key_object

Detailed Description
The data structure holding internal state of key verify signature. 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_KEYSTORE Struct Reference
Data Fields
char * systemdir
char * userdir
char * defaultprofile
IFAPI_KEY_SEARCH key_search
const char * rel_path

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_keystore.h

IFAPI_LoadKey Struct Reference

#include <fapi_int.h>
Data Fields
enum _FAPI_STATE_LOAD_KEY state
NODE_STR_T * path_list
NODE_OBJECT_T * key_list
IFAPI_OBJECT auth_object
size_t position
ESYS_TR handle
ESYS_TR parent_handle
bool parent_handle_persistent
IFAPI_OBJECT * key_object
char * key_path

Detailed Description
The data structure holding internal state of loading keys. 

Field Documentation
NODE_STR_T* path_list
The current used hierarchy for CreatePrimary 
enum _FAPI_STATE_LOAD_KEY state
The current state of key loading 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_MAX_BUFFER Struct Reference
Data Fields
UINT16 size
BYTE buffer [IFAPI_MAX_BUFFER_SIZE]

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_NV Struct Reference

#include <ifapi_keystore.h>
Data Fields
TPM2B_NV_PUBLIC public
UINT8_ARY serialization
UINT32 hierarchy
char * policyInstance
char * description
UINT8_ARY appData
TPMI_YES_NO with_auth
char * event_log

Detailed Description
Type for representing a FAPI NV object 

Field Documentation
UINT8_ARY appData
Application data 
char* description
Human readable description of key 
char* event_log
The event log if NV type is pcr 
UINT32 hierarchy
The hierarchy used for NV object creation 
char* policyInstance
Keys policy 
TPM2B_NV_PUBLIC public
The wrapped public portion of the object 
UINT8_ARY serialization
None 
TPMI_YES_NO with_auth
Authorization provided during creation 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_keystore.h

IFAPI_NV_Cmds Struct Reference

#include <fapi_int.h>
Data Fields
char * nvPath
char * policyPath
TPM2B_NV_PUBLIC public
ESYS_TR esys_auth_handle
ESYS_TR esys_handle
size_t numBytes
UINT16 bytesRequested
UINT16 offset
size_t data_idx
const uint8_t * data
uint8_t * rdata
size_t size
IFAPI_OBJECT auth_object
IFAPI_OBJECT nv_object
TPM2B_AUTH auth
IFAPI_NV nv_obj
ESYS_TR auth_index
uint64_t bitmap
IFAPI_NV_TEMPLATE public_templ
enum _FAPI_STATE_NV_READ nv_read_state
enum _FAPI_STATE_NV_WRITE nv_write_state
uint8_t * write_data
char * logData
json_object * jso_event_log
TPMI_RH_NV_INDEX maxNvIndex
IFAPI_EVENT pcr_event
TPML_DIGEST_VALUES digests
bool skip_policy_computation

Detailed Description
The data structure holding internal state of Fapi NV commands. 

Field Documentation
TPM2B_AUTH auth
The Password 
ESYS_TR auth_index
The ESAPI handle of the authorization object 
IFAPI_OBJECT auth_object
Object used for authentication 
uint64_t bitmap
The bitmask for the SetBits command 
UINT16 bytesRequested
Bytes currently requested from TPM 
const uint8_t* data
Buffer for data to be written 
size_t data_idx
Offset in the read buffer 
TPML_DIGEST_VALUES digests
Digest for the event data of an extend 
ESYS_TR esys_auth_handle
The ESAPI handle for the NV auth object 
ESYS_TR esys_handle
The ESAPI handle for the NV object 
json_object* jso_event_log
logData in JSON format 
char* logData
The event log for NV objects of type pcr 
TPMI_RH_NV_INDEX maxNvIndex
Max index for search for free index 
size_t numBytes
The number of bytes of a ESYS request 
IFAPI_NV nv_obj
The NV Object 
IFAPI_OBJECT nv_object
Deserialized NV object 
enum _FAPI_STATE_NV_READ nv_read_state
The current state of NV read 
enum _FAPI_STATE_NV_WRITE nv_write_state
The current state of NV write 
char* nvPath
The name of the file for object serialization 
UINT16 offset
Offset in TPM memory TPM 
IFAPI_EVENT pcr_event
Event to be added to log 
char* policyPath
The name of the policy file 
TPM2B_NV_PUBLIC public
The public info of the NV object. 
IFAPI_NV_TEMPLATE public_templ
The template for nv creation, adjusted appropriate by the passed flags 
uint8_t* rdata
Buffer for data to be read 
size_t size
size of rdata 
bool skip_policy_computation
switch whether policy needs to be computed 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_NV_TEMPLATE Struct Reference

#include <fapi_int.h>
Data Fields
TPMI_YES_NO system
TPMI_RH_HIERARCHY hierarchy
char * description
TPMS_NV_PUBLIC public

Detailed Description
Type for representing template for NV objects 

Field Documentation
char* description
Description of template. 
TPMI_RH_HIERARCHY hierarchy
Hierarchy for NV object. 
TPMS_NV_PUBLIC public
Template for public data 
TPMI_YES_NO system
Store the object in the system wide directory 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_OBJECT_UNION Union Reference

#include <ifapi_keystore.h>
Data Fields
IFAPI_EXT_PUB_KEY ext_pub_key
IFAPI_KEY key
IFAPI_NV nv
IFAPI_DUPLICATE key_tree
IFAPI_HIERARCHY hierarchy

Detailed Description
type for representing public info of a TPM-Resource 

Field Documentation
IFAPI_EXT_PUB_KEY ext_pub_key
Public info for external key. 
IFAPI_HIERARCHY hierarchy
Information related to hierarchies 
IFAPI_KEY key
Public info for key objects 
IFAPI_DUPLICATE key_tree
Information for key duplication 
IFAPI_NV nv
Public info for NV ram objects 

The documentation for this union was generated from the following file:
src/tss2-fapi/ifapi_keystore.h

IFAPI_Path_SetDescription Struct Reference

#include <fapi_int.h>
Data Fields
char * description
UINT8_ARY appData
IFAPI_OBJECT object
char * object_path
json_object * jso
char * jso_string

Detailed Description
The data structure holding internal state of Fapi_SetDescription. 

Field Documentation
UINT8_ARY appData
Application data to be stored in object store. 
char* description
The description of the object 
json_object* jso
JSON object for storing the AppData 
char* jso_string
JSON deserialized buffer 
IFAPI_OBJECT object
The IPAPI object to store the info 
char* object_path
The realative path to the object 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_PCR Struct Reference

#include <fapi_int.h>
Data Fields
TPML_DIGEST_VALUES digest_list
TPML_DIGEST_VALUES * event_digests
ESYS_TR PCR
TPML_PCR_SELECTION pcr_selection
TPML_PCR_SELECTION * pcr_selection_out
UINT32 update_count
TPML_DIGEST * pcrValues
TPM2_HANDLE pcrIndex
TPMI_ALG_HASH hashAlg
const char * keyPath
ESYS_TR handle
IFAPI_OBJECT * key_object
TPMS_CAPABILITY_DATA * capabilityData
uint32_t * pcrList
size_t pcrListSize
TPM2B_DATA qualifyingData
uint8_t const  * eventData
TPM2B_EVENT event
size_t eventDataSize
uint32_t const  * hashAlgs
uint32_t * hashAlgs2
size_t numHashAlgs
char const  * quoteInfo
TPM2B_ATTEST * tpm_quoted
TPMT_SIGNATURE * tpm_signature
uint8_t * signature
size_t signatureSize
char const  * logData
char * pcrLog
IFAPI_EVENT pcr_event
json_object * event_list
FAPI_QUOTE_INFO fapi_quote_info
uint8_t * pcrValue
size_t pcrValueSize
char * event_log_file

Detailed Description
The data structure holding internal state of Fapi_PCR commands. 

Field Documentation
TPML_DIGEST_VALUES digest_list
The digest list computed for the event 
TPML_DIGEST_VALUES* event_digests
The digest list computed by TPM2_Event 
ESYS_TR handle
The ESYS handle of the signing key 
IFAPI_OBJECT* key_object
The IPAPI object of the signing key 
const char* keyPath
The implicit key path for PCR_Quote 
ESYS_TR PCR
The handle of the PCR register to be extended 
TPML_PCR_SELECTION pcr_selection
Selection used for Read and Quote 
TPML_PCR_SELECTION* pcr_selection_out
Selection returned by PCR_Read 
uint32_t* pcrList
Array of PCR numbers 
size_t pcrListSize
Size of PCR array 
TPM2B_DATA qualifyingData
Nonce for quote command 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_POLICY_CTX Struct Reference

#include <fapi_int.h>
Data Fields
enum IFAPI_STATE_POLICY state
struct TPMS_POLICY policy
size_t digest_idx
size_t hash_size
char ** pathlist
TPMI_ALG_HASH hash_alg
IFAPI_POLICY_EXEC_CTX * policy_stack
IFAPI_POLICYUTIL_STACK * util_current_policy
IFAPI_POLICYUTIL_STACK * policyutil_stack
ESYS_TR session
enum FAPI_CREATE_SESSION_STATE create_session_state
char * path
IFAPI_POLICY_EVAL_INST_CTX eval_ctx

Detailed Description
The data structure holding internal policy state. 

Field Documentation
char** pathlist
The array of all objects in the search path 
IFAPI_POLICY_EXEC_CTX* policy_stack
The stack used for storing current policy information. e.g. for retry the current index of policy elements hash to be stored. 
IFAPI_POLICYUTIL_STACK* policyutil_stack
The stack used for storing current policy information. e.g. for retry the current index of policy elements hash to be stored. 
ESYS_TR session
Auxiliary variable to store created policy session. The value will also be stored in the policy stack 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_POLICY_EVAL_INST_CTX Struct Reference

#include <ifapi_policy_instantiate.h>
Data Fields
TPMS_POLICY * policy
NODE_OBJECT_T * policy_elements
ifapi_policyeval_INST_CB callbacks

Detailed Description
Type for representing the context for policy instantiation. 

Field Documentation
ifapi_policyeval_INST_CB callbacks
The policy elements to be instantiated 
TPMS_POLICY* policy
The policy to be instantiated 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_instantiate.h

IFAPI_POLICY_EXEC_CB_CTX Struct Reference

#include <ifapi_policy_callbacks.h>
Data Fields
enum IFAPI_STATE_POL_CB_EXCECUTE cb_state
char * object_path
IFAPI_OBJECT object
ESYS_TR key_handle
ESYS_TR nv_index
ESYS_TR auth_index
IFAPI_OBJECT auth_object
IFAPI_OBJECT * key_object_ptr
IFAPI_OBJECT * auth_object_ptr
IFAPI_NV_Cmds nv_cmd_state
IFAPI_NV_Cmds nv_cmd_state_sav
TPM2B_DIGEST policy_digest
ESYS_TR session
TPMS_POLICY * policy

Detailed Description
The context of the policy execution 

Field Documentation
ESYS_TR auth_index
Index of authorization object 
IFAPI_OBJECT auth_object
FAPI auth object needed for authorization 
enum IFAPI_STATE_POL_CB_EXCECUTE cb_state
The execution state of the current policy callback 
ESYS_TR key_handle
Handle of a used key 
IFAPI_NV_Cmds nv_cmd_state_sav
backup for state of fapi nv commands 
ESYS_TR nv_index
Index of nv object storing a policy 
IFAPI_OBJECT object
Object to be authorized 
char* object_path
The pathname determined by object search 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_callbacks.h

IFAPI_POLICY_EXEC_CTX Struct Reference

#include <ifapi_policy_execute.h>
Data Fields
enum IFAPI_STATE_POLICY_EXCECUTE state
TPML_DIGEST digest_list
IFAPI_POLICY_EXEC_CTX * next
IFAPI_POLICY_EXEC_CTX * prev
ESYS_TR session
TPMS_POLICY * policy
ESYS_TR policySessionSav
ESYS_TR object_handle
ESYS_TR nv_index
ESYS_TR auth_handle
IFAPI_OBJECT auth_objectNV
IFAPI_OBJECT * auth_object
ESYS_TR auth_session
TPMI_ALG_HASH hash_alg
void * app_data
NODE_OBJECT_T * policy_elements
TPM2B_DIGEST * nonceTPM
uint8_t * buffer
size_t buffer_size
TPM2B_NAME name
char * pem_key
struct POLICY_LIST * policy_list
ifapi_policyeval_EXEC_CB callbacks

Detailed Description
The context of the policy execution 

Field Documentation
void* app_data
Application data for policy execution callbacks 
IFAPI_OBJECT* auth_object
Object to be authorized 
IFAPI_OBJECT auth_objectNV
Object used for NV authentication 
ifapi_policyeval_EXEC_CB callbacks
callbacks used for execution of sub policies and actions which require access to the FAPI context. 
IFAPI_POLICY_EXEC_CTX* next
The digest list of policy or Pointer to next policy 
char* pem_key
Pem key recreated during policy execution 
NODE_OBJECT_T* policy_elements
The policy elements to be executed 
struct POLICY_LIST* policy_list
List of policies for authorization selection 
ESYS_TR policySessionSav
Backup policy session 
IFAPI_POLICY_EXEC_CTX* prev
Pointer to previous policy 
ESYS_TR session
The current policy session 
enum IFAPI_STATE_POLICY_EXCECUTE state
The execution state of the current policy command 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_execute.h

IFAPI_POLICY_STORE Struct Reference
Data Fields
char * policydir

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_store.h

ifapi_policyeval_EXEC_CB Struct Reference
Data Fields
ifapi_policyexec_cbauth cbauth
void * cbauth_userdata
ifapi_policyexec_cbpolsel cbpolsel
void * cbpolsel_userdata
ifapi_policyexec_cbsign cbsign
void * cbsign_userdata
ifapi_policyexec_cbauthpol cbauthpol
void * cbauthpol_userdata
ifapi_policyexec_cbauthnv cbauthnv
void * cbauthnv_userdata
ifapi_policyexec_cbdup cbdup
void * cbdup_userdata
ifapi_policyexec_cbaction cbaction
void * cbaction_userdata

Field Documentation
ifapi_policyexec_cbaction cbaction
Callback for policy action 
ifapi_policyexec_cbauth cbauth
Callback to authorize an object retrieved by name in keystore 
ifapi_policyexec_cbauthnv cbauthnv
Callback for policy authorize nv 
ifapi_policyexec_cbauthpol cbauthpol
Callback for policy authorize 
ifapi_policyexec_cbdup cbdup
Callback for policy duplication select 
ifapi_policyexec_cbpolsel cbpolsel
Callback for selection of policy branch 
ifapi_policyexec_cbsign cbsign
Callback for policy sign 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_execute.h

ifapi_policyeval_INST_CB Struct Reference
Data Fields
ifapi_policyeval_cbpcr cbpcr
void * cbpcr_userdata
ifapi_policyeval_cbname cbname
void * cbname_userdata
ifapi_policyeval_cbpublic cbpublic
void * cbpublic_userdata
ifapi_policyeval_cbnvpublic cbnvpublic
void * cbnvpublic_userdata

Field Documentation
ifapi_policyeval_cbname cbname
Callback to compute name of an object from path 
ifapi_policyeval_cbnvpublic cbnvpublic
Callback to compute the NV public from path 
ifapi_policyeval_cbpcr cbpcr
Callback to compute current PCR value 
ifapi_policyeval_cbpublic cbpublic
Callback to compute public info of a key 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_instantiate.h

IFAPI_POLICYUTIL_STACK Struct Reference

#include <ifapi_policyutil_execute.h>
Data Fields
ESYS_TR policy_session
IFAPI_POLICY_EXEC_CTX * pol_exec_ctx
enum IFAPI_STATE_POLICY_UTIL_EXEC state
IFAPI_POLICYUTIL_STACK * next
IFAPI_POLICYUTIL_STACK * prev

Detailed Description
The context of the policy execution 

Field Documentation
IFAPI_POLICYUTIL_STACK* next
Pointer to next policy 
IFAPI_POLICY_EXEC_CTX* pol_exec_ctx
The execution context for the current policy 
ESYS_TR policy_session
The policy session created for the current evaluation 
IFAPI_POLICYUTIL_STACK* prev
Pointer to previous policy 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policyutil_execute.h

IFAPI_PROFILE Struct Reference

#include <ifapi_profiles.h>
Data Fields
TPMI_ALG_PUBLIC type
char * srk_template
char * ek_template
char * srk_description
char * ek_description
TPMT_SIG_SCHEME ecc_signing_scheme
TPMT_SIG_SCHEME rsa_signing_scheme
TPMT_RSA_DECRYPT rsa_decrypt_scheme
TPMI_ALG_CIPHER_MODE sym_mode
TPMT_SYM_DEF_OBJECT sym_parameters
UINT16 sym_block_size
TPML_PCR_SELECTION pcr_selection
TPMI_ALG_HASH nameAlg
TPMI_RSA_KEY_BITS keyBits
UINT32 exponent
TPMI_ECC_CURVE curveID
TPMT_SYM_DEF session_symmetric
TPMS_POLICY * eh_policy
TPMS_POLICY * sh_policy
TPMS_POLICY * ek_policy
TPMS_POLICY * srk_policy
TPMS_POLICY * lockout_policy
UINT32 newMaxTries
UINT32 newRecoveryTime
UINT32 lockoutRecovery

Detailed Description
Internal structure for FAPI profiles 

Field Documentation
TPMT_SIG_SCHEME ecc_signing_scheme
Signing scheme for the ECC key. 
char* ek_description
EK description 
char* ek_template
EK template 
TPML_PCR_SELECTION pcr_selection
Parameters for symmectric encryption. 
TPMT_RSA_DECRYPT rsa_decrypt_scheme
Decrypt scheme for the RSA key. 
TPMT_SIG_SCHEME rsa_signing_scheme
Signing scheme for the RSA key. 
char* srk_description
SRK description 
char* srk_template
SRK template 
UINT16 sym_block_size
Block size for symmectric encryption. 
TPMI_ALG_CIPHER_MODE sym_mode
Mode for symmectric encryption. 
TPMT_SYM_DEF_OBJECT sym_parameters
Parameters for symmectric encryption. 
TPMI_ALG_PUBLIC type
The algorithm used for key creation 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_profiles.h

IFAPI_PROFILE_ENTRY Struct Reference
Data Fields
char * name
struct IFAPI_PROFILE profile

Field Documentation
char* name
Name of a profile 
struct IFAPI_PROFILE profile
Values for a profile 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_profiles.h

IFAPI_PROFILES Struct Reference
Data Fields
char * default_name
struct IFAPI_PROFILE default_profile
struct IFAPI_PROFILE_ENTRY * profiles
char ** filenames
size_t num_profiles
size_t profiles_idx

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_profiles.h

IFAPI_Provision Struct Reference

#include <fapi_int.h>
Data Fields
IFAPI_OBJECT hierarchy_lockout
IFAPI_OBJECT hierarchy_hs
IFAPI_OBJECT hierarchy_he
IFAPI_OBJECT hierarchy_hn
IFAPI_OBJECT * hierarchy
TPMS_POLICY * hierarchy_policy
IFAPI_KEY_TEMPLATE public_templ
TPM2B_PUBLIC public
char ** pathlist
size_t numPaths
size_t numHierarchyObjects
size_t hiearchy_idx
size_t path_idx
IFAPI_OBJECT * hierarchies
TPM2B_SENSITIVE_CREATE inSensitive
TPM2B_DATA outsideInfo
TPML_PCR_SELECTION creationPCR
ESYS_TR handle
const char * authValueLockout
const char * authValueEh
const char * policyPathEh
const char * authValueSh
const char * policyPathSh
size_t digest_idx
size_t hash_size
TPM2_HANDLE cert_nv_idx
TPM2B_NV_PUBLIC * nvPublic
ESYS_TR esys_nv_cert_handle
char * pem_cert
TPM2_ALG_ID cert_key_type
size_t cert_count
size_t cert_idx
TPMS_CAPABILITY_DATA * capabilityData
IFAPI_OBJECT hierarchy_object
TPM2B_AUTH hierarchy_auth
TPM2B_DIGEST policy_digest
char * intermed_crt
char * root_crt
TPMA_PERMANENT auth_state
ESYS_TR srk_esys_handle
ESYS_TR ek_esys_handle
ESYS_TR srk_tpm_handle
ESYS_TR ek_tpm_handle
bool srk_exists

Detailed Description
The data structure holding internal state of Provisioning. 

Field Documentation
size_t hiearchy_idx
Index to the current hierarchy 
IFAPI_OBJECT* hierarchies
Array of the hierarchies stored in keystore. 
IFAPI_OBJECT* hierarchy
The current hierarchy 
IFAPI_OBJECT hierarchy_he
The endorsement hierarchy 
IFAPI_OBJECT hierarchy_hn
The null hierarchy 
IFAPI_OBJECT hierarchy_hs
The storage hierarchy 
IFAPI_OBJECT hierarchy_lockout
The lockout hierarchy 
TPMS_POLICY* hierarchy_policy
Policy of the current used hierarchy. 
size_t numHierarchyObjects
Number of hierarchies stored in keystore 
size_t numPaths
Size of array with all keystore objects 
size_t path_idx
Index of array with the object paths 
char** pathlist
The array with all keystore objects 
TPM2B_PUBLIC public
The public info of the created primary 
IFAPI_KEY_TEMPLATE public_templ
The basic template for the keys public data 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

IFAPI_TPMI_POLICYTYPE_ASSIGN Struct Reference
Data Fields
TPMI_POLICYTYPE in
char * name

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_json_deserialize.c

IFAPI_TSS_EVENT Struct Reference

#include <ifapi_eventlog.h>
Data Fields
TPM2B_EVENT data
char * event

Detailed Description
TSS event information 

Field Documentation
TPM2B_EVENT data
The event data 
char* event
TSS event information 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_eventlog.h

IFAPI_Unseal Struct Reference

#include <fapi_int.h>
Data Fields
const char * keyPath
IFAPI_OBJECT * object
TPM2B_SENSITIVE_DATA * unseal_data

Detailed Description
The data structure holding internal state of Fapi_Unseal. 

Field Documentation
const char* keyPath
The implicit key path 
IFAPI_OBJECT* object
The IPAPI object storing the data to be unsealed 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_int.h

object_node Struct Reference

#include <fapi_types.h>
Data Fields
void * object
size_t size
struct object_node * next

Detailed Description
The data structure storing a linked list of objects.
The structure is used for the processing of file paths 

Field Documentation
struct object_node* next
Pointer to next element 
void* object
The pointer to the object 
size_t size
Will be used only for BYTE arrays 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_types.h

POLICY_LIST Struct Reference

#include <ifapi_policy_execute.h>
Data Fields
const char * path
TPMS_POLICY policy
struct POLICY_LIST * next

Detailed Description
List of policies which fulfill a certain predicate.
The elements are stored in a linked list. 

Field Documentation
struct POLICY_LIST* next
Pointer to next element 
const char* path
The path of the policy object 
TPMS_POLICY policy
The policy object 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_execute.h

policy_object_node Struct Reference

#include <ifapi_policy_execute.h>
Data Fields
const char * path
TPMS_POLICY policy
struct policy_object_node * next

Detailed Description
List of policies which fulfill a certain predicate.
The elements are stored in a linked list. 

Field Documentation
struct policy_object_node* next
Pointer to next element 
const char* path
The path of the policy object 
TPMS_POLICY policy
The policy object 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_execute.h

str_node Struct Reference

#include <fapi_types.h>
Data Fields
char * str
bool free_string
struct str_node * next

Detailed Description
The data structure storing a linked list of strings.
The structure is used for the processing of file paths 

Field Documentation
bool free_string
Indicates whether a free has to called on cleanup 
struct str_node* next
Pointer to next element 
char* str
A string of the string list 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_types.h

tpm_getekcertificate_ctx Struct Reference
Data Fields
char * ec_cert_path
FILE * ec_cert_file_handle
char * ek_server_addr
unsigned int SSL_NO_VERIFY
char * ek_path
bool verbose
bool is_tpm2_device_active
TPM2B_PUBLIC * out_public

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_get_intl_cert.c

TPMI_POLICYTYPE_ASSIGN Struct Reference
Data Fields
TPMI_POLICYTYPE in
char * name

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_json_serialize.c

TPML_PCRVALUES Struct Reference

#include <ifapi_policy_types.h>
Data Fields
UINT32 count
TPMS_PCRVALUE pcrs []

Detailed Description
Policy type TPML_PCRVALUES 

Field Documentation
UINT32 count
None 
TPMS_PCRVALUE pcrs[]
Array of pcr values 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_types.h

TPML_POLICYAUTHORIZATIONS Struct Reference

#include <ifapi_policy_types.h>
Data Fields
UINT32 count
TPMS_POLICYAUTHORIZATION authorizations []

Detailed Description
Policy type TPML_POLICYAUTHORIZATIONS 

Field Documentation
TPMS_POLICYAUTHORIZATION authorizations[]
Array of policy elements 
UINT32 count
None 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_types.h

TPML_POLICYBRANCHES Struct Reference

#include <ifapi_policy_types.h>
Data Fields
UINT32 count
TPMS_POLICYBRANCH authorizations []

Detailed Description
Policy type TPML_POLICYBRANCHES 

Field Documentation
TPMS_POLICYBRANCH authorizations[]
Array of policy elements 
UINT32 count
None 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_types.h

TPML_POLICYELEMENTS Struct Reference

#include <ifapi_policy_types.h>
Data Fields
UINT32 count
TPMT_POLICYELEMENT elements []

Detailed Description
Policy type TPML_POLICYELEMENTS 

Field Documentation
UINT32 count
None 
TPMT_POLICYELEMENT elements[]
Array of policy elements 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_types.h

TPMS_PCRVALUE Struct Reference

#include <ifapi_policy_types.h>
Data Fields
UINT32 pcr
TPM2_ALG_ID hashAlg
TPMU_HA digest

Detailed Description
Policy type TPMS_PCRVALUE 

Field Documentation
TPMU_HA digest
None 
TPM2_ALG_ID hashAlg
None 
UINT32 pcr
None 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_types.h

TPMS_POLICY Struct Reference

#include <ifapi_policy_types.h>
Data Fields
char * description
TPML_DIGEST_VALUES policyDigests
struct TPML_POLICYAUTHORIZATIONS * policyAuthorizations
struct TPML_POLICYELEMENTS * policy

Detailed Description
Policy type TPMS_POLICY 

Field Documentation
char* description
O 
struct TPML_POLICYELEMENTS* policy
X 
struct TPML_POLICYAUTHORIZATIONS* policyAuthorizations
O 
TPML_DIGEST_VALUES policyDigests
O 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_types.h

TPMS_POLICYACTION Struct Reference

#include <ifapi_policy_types.h>
Data Fields
char * action

Detailed Description
Policy type TPMS_POLICYACTION 

Field Documentation
char* action
The FAPI will return a string representation of the JSON sub 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_types.h

TPMS_POLICYAUTHORIZATION Struct Reference

#include <ifapi_policy_types.h>
Data Fields
char * type
TPMT_PUBLIC key
TPM2B_NONCE policyRef
TPMT_SIGNATURE signature
TPMI_ALG_HASH keyPEMhashAlg
UINT8_ARY pemSignature
char * keyPEM
TPMT_RSA_SCHEME rsaScheme

Detailed Description
Policy type TPMS_POLICYAUTHORIZATION 

Field Documentation
TPMT_PUBLIC key
Selector of the algorithm used for the signature and the pub 
TPM2B_NONCE policyRef
None 
TPMT_SIGNATURE signature
None 
char* type
tpm 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_types.h

TPMS_POLICYAUTHORIZE Struct Reference

#include <ifapi_policy_types.h>
Data Fields
TPM2B_DIGEST approvedPolicy
TPM2B_NONCE policyRef
TPM2B_NAME keyName
TPMT_TK_VERIFIED checkTicket
char * keyPath
TPMT_PUBLIC keyPublic
char * keyPEM
TPMI_ALG_HASH keyPEMhashAlg
TPMT_RSA_SCHEME rsaScheme
TPMT_SIGNATURE signature

Detailed Description
Policy type TPMS_POLICYAUTHORIZE 

Field Documentation
TPM2B_DIGEST approvedPolicy
None 
TPMT_TK_VERIFIED checkTicket
None 
TPM2B_NAME keyName
Not exposed in JSON, but generated from keyPath, keyPublic o 
char* keyPath
A reference to a key inside the FAPI keystore 
char* keyPEM
everyone in favour
 The TPM2B_NAME is constructed w 
TPMI_ALG_HASH keyPEMhashAlg
(optional) Default = SHA256 
TPMT_PUBLIC keyPublic
None 
TPM2B_NONCE policyRef
None 
TPMT_RSA_SCHEME rsaScheme
(optional) Default = TPM2_ALG_RSAPSS 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_types.h

TPMS_POLICYAUTHORIZENV Struct Reference

#include <ifapi_policy_types.h>
Data Fields
char * nvPath
TPM2B_NV_PUBLIC nvPublic
TPM2B_DIGEST policy
TPMT_HA nv_policy
uint8_t * policy_buffer

Detailed Description
Policy type TPMS_POLICYAUTHORIZENV 

Field Documentation
TPMT_HA nv_policy
Policy stored in NV ram 
char* nvPath
None 
TPM2B_NV_PUBLIC nvPublic
None 
TPM2B_DIGEST policy
Policy Digest 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_types.h

TPMS_POLICYAUTHVALUE Struct Reference

#include <ifapi_policy_types.h>

Detailed Description
Policy type TPMS_POLICYAUTHVALUE 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_types.h

TPMS_POLICYBRANCH Struct Reference

#include <ifapi_policy_types.h>
Data Fields
char * name
char * description
TPML_DIGEST_VALUES policyDigests
struct TPML_POLICYELEMENTS * policy

Detailed Description
Policy type TPMS_POLICYBRANCH 

Field Documentation
char* description
None 
char* name
None 
struct TPML_POLICYELEMENTS* policy
Array of policy elements 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_types.h

TPMS_POLICYCOMMANDCODE Struct Reference

#include <ifapi_policy_types.h>
Data Fields
TPM2_CC code

Detailed Description
Policy type TPMS_POLICYCOMMANDCODE 

Field Documentation
TPM2_CC code
None 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_types.h

TPMS_POLICYCOUNTERTIMER Struct Reference

#include <ifapi_policy_types.h>
Data Fields
TPM2B_OPERAND operandB
UINT16 offset
TPM2_EO operation

Detailed Description
Policy type TPMS_POLICYCOUNTERTIMER 

Field Documentation
UINT16 offset
Default is 0 
TPM2B_OPERAND operandB
None 
TPM2_EO operation
None 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_types.h

TPMS_POLICYCPHASH Struct Reference

#include <ifapi_policy_types.h>
Data Fields
TPM2B_DIGEST cpHash

Detailed Description
Policy type TPMS_POLICYCPHASH 

Field Documentation
TPM2B_DIGEST cpHash
None 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_types.h

TPMS_POLICYDUPLICATIONSELECT Struct Reference

#include <ifapi_policy_types.h>
Data Fields
TPM2B_NAME objectName
TPM2B_NAME newParentName
TPMI_YES_NO includeObject
char * newParentPath
TPM2B_PUBLIC newParentPublic

Detailed Description
Policy type TPMS_POLICYDUPLICATIONSELECT 

Field Documentation
TPMI_YES_NO includeObject
Always NO 
TPM2B_NAME newParentName
Automatically calculated 
char* newParentPath
None 
TPM2B_PUBLIC newParentPublic
None 
TPM2B_NAME objectName
Will not be used (see includeObject) 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_types.h

TPMS_POLICYLOCALITY Struct Reference

#include <ifapi_policy_types.h>
Data Fields
TPMA_LOCALITY locality

Detailed Description
Policy type TPMS_POLICYLOCALITY 

Field Documentation
TPMA_LOCALITY locality
None 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_types.h

TPMS_POLICYNAMEHASH Struct Reference

#include <ifapi_policy_types.h>
Data Fields
UINT32 count
UINT32 i
TPM2B_NAME objectNames [3]
char * namePaths [3]
TPM2B_DIGEST nameHash

Detailed Description
Policy type TPMS_POLICYNAMEHASH 

Field Documentation
UINT32 count
Computed during instantiation 
UINT32 i
Temporary index for policy calculation 
TPM2B_DIGEST nameHash
computed during policy calculation 
char* namePaths[3]
Paths of objects used for retrieving the names 
TPM2B_NAME objectNames[3]
computed during instantiation (if not initialized) 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_types.h

TPMS_POLICYNV Struct Reference

#include <ifapi_policy_types.h>
Data Fields
char * nvPath
TPMI_RH_NV_INDEX nvIndex
TPM2B_NV_PUBLIC nvPublic
TPMI_RH_NV_AUTH authHandle
TPM2B_OPERAND operandB
UINT16 offset
TPM2_EO operation

Detailed Description
Policy type TPMS_POLICYNV 

Field Documentation
TPMI_RH_NV_AUTH authHandle
This is determined by FAPI at runtime. 
TPMI_RH_NV_INDEX nvIndex
None 
char* nvPath
None 
TPM2B_NV_PUBLIC nvPublic
None 
UINT16 offset
Default value is 0 
TPM2B_OPERAND operandB
None 
TPM2_EO operation
Default value is EQUAL 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_types.h

TPMS_POLICYNVWRITTEN Struct Reference

#include <ifapi_policy_types.h>
Data Fields
TPMI_YES_NO writtenSet

Detailed Description
Policy type TPMS_POLICYNVWRITTEN 

Field Documentation
TPMI_YES_NO writtenSet
Default is yes 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_types.h

TPMS_POLICYOR Struct Reference

#include <ifapi_policy_types.h>
Data Fields
struct TPML_POLICYBRANCHES * branches

Detailed Description
Policy type TPMS_POLICYOR 

Field Documentation
struct TPML_POLICYBRANCHES* branches
An (infinite) array of policy elements. This does not contai 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_types.h

TPMS_POLICYPASSWORD Struct Reference

#include <ifapi_policy_types.h>

Detailed Description
Policy type TPMS_POLICYPASSWORD 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_types.h

TPMS_POLICYPCR Struct Reference

#include <ifapi_policy_types.h>
Data Fields
struct TPML_PCRVALUES * pcrs
TPMS_PCR_SELECT currentPCRs
TPML_PCR_SELECTION currentPCRandBanks

Detailed Description
Policy type TPMS_POLICYPCR 

Field Documentation
TPML_PCR_SELECTION currentPCRandBanks
Complete selection with banks 
TPMS_PCR_SELECT currentPCRs
The hashAlg are inferred from 
struct TPML_PCRVALUES* pcrs
None 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_types.h

TPMS_POLICYPHYSICALPRESENCE Struct Reference

#include <ifapi_policy_types.h>

Detailed Description
Policy type TPMS_POLICYPHYSICALPRESENCE 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_types.h

TPMS_POLICYSECRET Struct Reference

#include <ifapi_policy_types.h>
Data Fields
TPM2B_NONCE nonceTPM
TPM2B_DIGEST cpHashA
TPM2B_NONCE policyRef
INT32 expiration
char * objectPath
TPM2B_NAME objectName

Detailed Description
Policy type TPMS_POLICYSECRET 

Field Documentation
TPM2B_DIGEST cpHashA
None 
INT32 expiration
None 
TPM2B_NONCE nonceTPM
None 
TPM2B_NAME objectName
Public name of the object 
char* objectPath
Path of the object 
TPM2B_NONCE policyRef
Default is zero length 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_types.h

TPMS_POLICYSIGNED Struct Reference

#include <ifapi_policy_types.h>
Data Fields
TPM2B_NONCE nonceTPM
TPM2B_DIGEST cpHashA
TPM2B_NONCE policyRef
INT32 expiration
TPMT_SIGNATURE auth
TPM2B_NAME publicKey
char * publicKeyHint
char * keyPath
TPMT_PUBLIC keyPublic
char * keyPEM
TPMI_ALG_HASH keyPEMhashAlg
TPMT_RSA_SCHEME rsaScheme
TPMT_SIGNATURE signature_tpm

Detailed Description
Policy type TPMS_POLICYSIGNED 

Field Documentation
TPMT_SIGNATURE auth
This value is generated from at runtime via a callback. 
TPM2B_DIGEST cpHashA
This value will be automatically generated by the FAPI. 
INT32 expiration
This value will be -1 by the FAPI 
char* keyPath
A reference to a key inside the FAPI keystore 
char* keyPEM
The TPM2B_NAME is constructed with a TPMT_PUBLIC from this 
TPMI_ALG_HASH keyPEMhashAlg
(optional) Default = SHA256 
TPMT_PUBLIC keyPublic
None 
TPM2B_NONCE nonceTPM
This is a value returned by TPM2_StartAuthSession and thus n 
TPM2B_NONCE policyRef
Default is zero-length 
TPM2B_NAME publicKey
This will be automatically generated from keyPath, keyPublic 
char* publicKeyHint
A human readable hint to denote which public key to use. 
TPMT_RSA_SCHEME rsaScheme
(optional) Default = TPM2_ALG_RSAPSS 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_types.h

TPMS_POLICYTEMPLATE Struct Reference

#include <ifapi_policy_types.h>
Data Fields
TPM2B_DIGEST templateHash
TPM2B_PUBLIC templatePublic
char * templateName

Detailed Description
Policy type TPMS_POLICYTEMPLATE 

Field Documentation
TPM2B_DIGEST templateHash
None 
char* templateName
None 
TPM2B_PUBLIC templatePublic
None 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_types.h

TPMT_POLICYELEMENT Struct Reference

#include <ifapi_policy_types.h>
Data Fields
TPMI_POLICYTYPE type
TPML_DIGEST_VALUES policyDigests
TPMU_POLICYELEMENT element

Detailed Description
Policy type TPMT_POLICYELEMENT 

Field Documentation
TPMU_POLICYELEMENT element
The union does is not embedded inside a field. 
TPML_DIGEST_VALUES policyDigests
None 
TPMI_POLICYTYPE type
None 

The documentation for this struct was generated from the following file:
src/tss2-fapi/ifapi_policy_types.h

TPMU_POLICYELEMENT Union Reference

#include <ifapi_policy_types.h>
Data Fields
TPMS_POLICYOR PolicyOr
TPMS_POLICYSIGNED PolicySigned
TPMS_POLICYSECRET PolicySecret
TPMS_POLICYPCR PolicyPCR
TPMS_POLICYLOCALITY PolicyLocality
TPMS_POLICYNV PolicyNV
TPMS_POLICYCOUNTERTIMER PolicyCounterTimer
TPMS_POLICYCOMMANDCODE PolicyCommandCode
TPMS_POLICYPHYSICALPRESENCE PolicyPhysicalPresence
TPMS_POLICYCPHASH PolicyCpHash
TPMS_POLICYNAMEHASH PolicyNameHash
TPMS_POLICYDUPLICATIONSELECT PolicyDuplicationSelect
TPMS_POLICYAUTHORIZE PolicyAuthorize
TPMS_POLICYAUTHVALUE PolicyAuthValue
TPMS_POLICYPASSWORD PolicyPassword
TPMS_POLICYNVWRITTEN PolicyNvWritten
TPMS_POLICYTEMPLATE PolicyTemplate
TPMS_POLICYAUTHORIZENV PolicyAuthorizeNv
TPMS_POLICYACTION PolicyAction

Detailed Description
[u''] 

Field Documentation
TPMS_POLICYACTION PolicyAction
None 
TPMS_POLICYAUTHORIZE PolicyAuthorize
None 
TPMS_POLICYAUTHORIZENV PolicyAuthorizeNv
None 
TPMS_POLICYAUTHVALUE PolicyAuthValue
None 
TPMS_POLICYCOMMANDCODE PolicyCommandCode
None 
TPMS_POLICYCOUNTERTIMER PolicyCounterTimer
None 
TPMS_POLICYCPHASH PolicyCpHash
None 
TPMS_POLICYDUPLICATIONSELECT PolicyDuplicationSelect
None 
TPMS_POLICYLOCALITY PolicyLocality
None 
TPMS_POLICYNAMEHASH PolicyNameHash
None 
TPMS_POLICYNV PolicyNV
None 
TPMS_POLICYNVWRITTEN PolicyNvWritten
None 
TPMS_POLICYOR PolicyOr
None 
TPMS_POLICYPASSWORD PolicyPassword
None 
TPMS_POLICYPCR PolicyPCR
None 
TPMS_POLICYPHYSICALPRESENCE PolicyPhysicalPresence
None 
TPMS_POLICYSECRET PolicySecret
None 
TPMS_POLICYSIGNED PolicySigned
None 
TPMS_POLICYTEMPLATE PolicyTemplate
None 

The documentation for this union was generated from the following file:
src/tss2-fapi/ifapi_policy_types.h

UINT8_ARY Struct Reference

#include <fapi_types.h>
Data Fields
size_t size
uint8_t * buffer

Detailed Description
The data structure representing an unit8_t array. 

The documentation for this struct was generated from the following file:
src/tss2-fapi/fapi_types.h

Index
INDEX