Introduction to Library Functions Tspi_Context_CreateObject(3)
NAME
Tspi_Context_CreateObject - create an empty object and
return a handle to that object.SYNOPSIS
#include
#include
#include
#include
#include
#include
#include
TSS_RESULT Tspi_Context_CreateObject(TSS_HCONTEXT hContext, TSS_FLAG objectType,
TSS_FLAG initFlags, TSS_HOBJECT* phObject);
DESCRIPTION
TSS_Context_CreateObject creates and initializes an empty
object of the specified type and returns a handle addressingthat object. The object is bound to an already opened con-
text hContext.PARAMETERS
hContext The handle of the context object. objectType 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
TSS_OBJECT_TYPE_RSAKEY - an RSA key.
TSS_OBJECT_TYPE_PCRS - a PCR composite object.
TSS_OBJECT_TYPE_HASH - a hash object.
initFlagsFlag indicating the default attributes of the object. Attri-
butes for each type of object are: Policy: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
TSS 1.1 Last change: 2004-05-26 1
Introduction to Library Functions Tspi_Context_CreateObject(3)
operation.TSS_ENCDATA_BIND - A data object used for a Bind
operation.TSS_ENCDATA_LEGACY - A data object for a bind opera-
tion 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 en-
crypt 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 exter-
nal 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 un-
loaded 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 authoriza-
tion.TSS_KEY_NO_AUTHORIZATION - Key will not require au-
thorization. [DEFAULT]TSS_KEY_EMPTY_KEY - Key template which will be re-
turned as an object with very few attributes. PCR composite objects: None. Hash objects:TSS_HASH_SHA1 - a hash object of type SHA-1.
TSS_HASH_OTHER - a hash object of type other than
SHA-1.
phObject The handle of the object to be created.TSS 1.1 Last change: 2004-05-26 2
Introduction to Library Functions Tspi_Context_CreateObject(3)
RETURN CODESTspi_Context_CreateObject returns TSS_SUCCESS on success,
otherwise one of the following values are returned:TSS_E_INVALID_HANDLE - Either hContext or phObject
TSS_E_INTERNAL_ERROR - An error occurred internal
CONFORMING TOTspi_Context_CreateObject conforms to the Trusted Computing
Group Software Specification version 1.1 GoldenSEE ALSO
Tspi_Context_CloseObject(3).
ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:__________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|____________________|_____________________________|_
| Availability | library/security/trousers ||____________________|_____________________________|_
| Interface Stability| Uncommitted ||____________________|____________________________|
NOTES Source for trousers is available at http://opensolaris.organd at http://sourceforge.net/projects/trousers. Documenta-
tion is available at file:///usr/share/man, and http://sourceforge.net/projects/trousers.TSS 1.1 Last change: 2004-05-26 3