Tspi_Context_CreateObject (3) - Linux Manuals

Tspi_Context_CreateObject: create an empty object and return a handle to that object.


Tspi_Context_CreateObject - create an empty object and return a handle to that object.


#include <tss/platform.h>
#include <tss/tcpa_defines.h>
#include <tss/tcpa_typedef.h>
#include <tss/tcpa_struct.h>
#include <tss/tss_typedef.h>
#include <tss/tss_structs.h>
#include <tss/tspi.h>

TSS_RESULT Tspi_Context_CreateObject(TSS_HCONTEXT hContext,  TSS_FLAG     objectType,
                                     TSS_FLAG     initFlags, TSS_HOBJECT* phObject);


TSS_Context_CreateObject creates and initializes an empty object of the specified type and returns a handle addressing that object. The object is bound to an already opened context hContext.



The handle of the context object.


Flag indicating the object type to create. Possible types are:
TSS_OBJECT_TYPE_POLICY - a policy object.
TSS_OBJECT_TYPE_ENCDATA - an encrypted data object (either sealed or bound data).
TSS_OBJECT_TYPE_PCRS - a PCR composite object.
TSS_OBJECT_TYPE_HASH - a hash object.


Flag indicating the default attributes of the object. Attributes for each type of object are:

 TSS_POLICY_USAGE - a usage policy (for authorization to use an object).
 TSS_POLICY_MIGRATION - a migration policy.
Encrypted data objects:

 TSS_ENCDATA_SEAL - A data object used for a Seal operation.
 TSS_ENCDATA_BIND - A data object used for a Bind operation.
 TSS_ENCDATA_LEGACY - A data object for a bind operation using a legacy key.
RSA Keys:

 TSS_KEY_SIZE_DEFAULT - Use the default key size of the TCS you're connected to.
 TSS_KEY_SIZE_512 - Create a 512 bit key.
 TSS_KEY_SIZE_1024 - Create a 1024 bit key.
 TSS_KEY_SIZE_2048 - Create a 2048 bit key.
 TSS_KEY_SIZE_4096 - Create a 4096 bit key.
 TSS_KEY_SIZE_8192 - Create a 8192 bit key.
 TSS_KEY_SIZE_16384 - Create a 16384 bit key.
 TSS_KEY_TYPE_STORAGE - Create a storage key. (Used to wrap other keys).
 TSS_KEY_TYPE_SIGNING - Create a signing key.
 TSS_KEY_TYPE_BIND - Create a binding key. (Used to encrypt data).
 TSS_KEY_TYPE_IDENTITY - Create an identity key. (Used for an identity).
 TSS_KEY_TYPE_LEGACY - Create a legacy key. (Can be used for signing and binding, created from data external to a TSS).
 TSS_KEY_TYPE_AUTHCHANGE - Create an ephemeral key used to change authorization values.
 TSS_KEY_VOLATILE - Create a volatile key. (Must be unloaded at startup).
 TSS_KEY_NON_VOLATILE - Create a non-volatile key. (May be unloaded at startup).
 TSS_KEY_MIGRATABLE - Create a migratable key.
 TSS_KEY_NOT_MIGRATABLE - Create a non-migratable key. [DEFAULT]
 TSS_KEY_AUTHORIZATION - Key will require authorization.
 TSS_KEY_NO_AUTHORIZATION - Key will not require authorization. [DEFAULT]
 TSS_KEY_EMPTY_KEY - Key template which will be returned as an object with very few attributes.

PCR composite objects:

Hash objects:

 TSS_HASH_SHA1 - a hash object of type SHA-1.
 TSS_HASH_OTHER - a hash object of type other than SHA-1.


The handle of the object to be created.


Tspi_Context_CreateObject returns TSS_SUCCESS on success, otherwise one of the following values are returned:

TSS_E_INVALID_HANDLE - Either hContext or phObject is an invalid handle.
TSS_E_INTERNAL_ERROR - An error occurred internal to the TSS.


Tspi_Context_CreateObject conforms to the Trusted Computing Group Software Specification version 1.1 Golden