|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface TcIContext
The Context class represents a context of a connection to the TSS Core Service running on the
local or a remote TCG system.
The focus of the Context object is:
| Method Summary | |
|---|---|
void |
closeContext()
This method destroys the object associated with the object handle. |
void |
closeObject(TcIWorkingObject obj)
This method is used to close a given object. |
void |
connect()
This method tries to connect the context to the default host (localhost). |
void |
connect(String hostname)
This method tries to connect the context to a host running a TCS service. |
TcIEncData |
createEncDataObject(long initFlags)
This method returns a new encdata object. |
TcIHash |
createHashObject(long initFlags)
This method returns a new hash object. |
TcIPcrComposite |
createPcrCompositeObject(long initFlags)
This method returns a new PCR object. |
TcIPolicy |
createPolicyObject(long initFlags)
This method returns a new policy object. |
TcIRsaKey |
createRsaKeyObject(long initFlags)
This method returns a new key object. |
void |
freeMemory(long cPtr)
This method frees memory allocated by TSS Service Provider on a context base. |
TcBlobData |
getCapability(long capArea,
TcBlobData subCap)
This method provides the capabilities of the TSS Core Service or TSS Service Provider. |
boolean |
getCapabilityBoolean(long capArea,
TcBlobData subCap)
This method provides the capabilities of the TSS Core Service or TSS Service Provider. |
TcTssVersion |
getCapabilityVersion(long capArea,
TcBlobData subCap)
This method provides the capabilities of the TSS Core Service or TSS Service Provider. |
TcIPolicy |
getDefaultPolicy()
This method provides the default policy object of the context. |
TcIRsaKey |
getKeyByPublicInfo(long stypeKey,
long algId,
TcBlobData publicInfo)
This method searches the persistent storage for a registered key using the provided public key information and creates a key object initialized according to the found data. |
TcIRsaKey |
getKeyByUuid(long stypeKey,
TcTssUuid uuidKey)
This method searches the persistent storage for a registered key using the provided UUID and creates a key object initialized according to the found data. |
TcINvRam |
getNvRamObject(long initFlags)
This method is used to obtain a NV RAM object that allows interaction with the TPM's NV RAM. |
TcTssKmKeyinfo[] |
getRegisteredKeysByUuid(TcTssUuid uuid,
long storage)
This method gets an array of key info objects. |
TcTssKmKeyinfo[] |
getRegisteredKeysByUuidSystem(TcTssUuid uuid)
This method is a wrapper for the getRegisteredKeysByUuid method. |
TcTssKmKeyinfo[] |
getRegisteredKeysByUuidUser(TcTssUuid uuid)
This method is a wrapper for the getRegisteredKeysByUuid method. |
TcITpm |
getTpmObject()
This method is used to obtain a TPM object that allows interaction with the system's TPM. |
boolean |
isConnected()
This method returns the status of the context: True is returned if the context is connected, otherwise false. |
TcIRsaKey |
loadKeyByBlob(TcIRsaKey unwrappingKey,
TcBlobData blob)
This method creates a key object based on the information got by the key blob and loads the key into the TPM which unwraps the key blob utilizing the key addressed by unwrappingKey. |
TcIRsaKey |
loadKeyByUuidFromSystem(TcTssUuid uuid)
This method creates a key object based on the information contained in the key manager using the UUID and loads the key into the TPM. |
TcIRsaKey |
loadKeyByUuidFromUser(TcTssUuid uuid)
This method creates a key object based on the information contained in the key manager using the UUID and loads the key into the TPM. |
void |
registerKey(TcIRsaKey key,
long stypeKey,
TcTssUuid uuidKey,
long stypePartenKey,
TcTssUuid uuidParent)
This method registers a key in the TSS Persistent Storage database. |
Object[] |
tickStampBlog(TcTpmDigest digestToStamp,
TcIRsaKey key,
TcTssValidation validationData)
This method is similar to a time stamp: it associates a tick value with a blob, indicating that the blob existed at some point earlier than the time corresponding to the tick value. |
TcIRsaKey |
unregisterKey(long stypeKey,
TcTssUuid uuidKey)
This method unregisters a key from the persistent storage database. |
| Methods inherited from interface TcIAttributes |
|---|
getAttribData, getAttribUint32, setAttribData, setAttribUint32 |
| Method Detail |
|---|
void connect(String hostname)
throws TcTssException
hostname - The name of the cost to connect to.
TcTssException
void connect()
throws TcTssException
TcTssExceptionboolean isConnected()
TcITpm getTpmObject()
throws TcTssException
TcTssException
TcINvRam getNvRamObject(long initFlags)
throws TcTssException
TcTssException
TcIRsaKey createRsaKeyObject(long initFlags)
throws TcTssException
TcTssConstants.TSS_OBJECT_TYPE_RSAKEY.
initFlags - is used to specify further options for the new object as defined by the TSS
specification. Key related initialization values are prefixed with TSS_KEY_ and are
defined in TcTssConstants. TcTssConstants.TSS_KEY_SIZE_DEFAULTTcTssConstants.TSS_KEY_SIZE_512TcTssConstants.TSS_KEY_SIZE_1024TcTssConstants.TSS_KEY_SIZE_2048TcTssConstants.TSS_KEY_SIZE_4096TcTssConstants.TSS_KEY_SIZE_8192TcTssConstants.TSS_KEY_SIZE_16384TcTssConstants.TSS_KEY_TYPE_AUTHCHANGETcTssConstants.TSS_KEY_TYPE_BINDTcTssConstants.TSS_KEY_TYPE_DEFAULTTcTssConstants.TSS_KEY_TYPE_IDENTITYTcTssConstants.TSS_KEY_TYPE_LEGACY (signing and binding)TcTssConstants.TSS_KEY_TYPE_SIGNINGTcTssConstants.TSS_KEY_TYPE_STORAGETcTssConstants.TSS_KEY_NON_VOLATILETcTssConstants.TSS_KEY_VOLATILETcTssConstants.TSS_KEY_NOT_MIGRATABLE (default)TcTssConstants.TSS_KEY_MIGRATABLETcTssConstants.TSS_KEY_CERTIFIED_MIGRATABLETcTssConstants.TSS_KEY_NOT_CERTIFIED_MIGRATABLETcTssConstants.TSS_KEY_NO_AUTHORIZATION (default)TcTssConstants.TSS_KEY_AUTHORIZATIONTcTssConstants.TSS_KEY_AUTHORIZATION_PRIV_USE_ONLYTcTssConstants.TSS_KEY_STRUCT_DEFAULT (default)TcTssConstants.TSS_KEY_STRUCT_KEYTcTssConstants.TSS_KEY_STRUCT_KEY12TcTssConstants.TSS_KEY_TSP_SRKTcTssException
TcIPolicy createPolicyObject(long initFlags)
throws TcTssException
initFlags - is used to specify further options for the new object as defined by the TSS
specification. Policy related initialization values are prefixed with TSS_POLICY_ and
are defined in TcTssConstants. TcTssException
TcIEncData createEncDataObject(long initFlags)
throws TcTssException
initFlags - is used to specify further options for the new object as defined by the TSS
specification. EncData related initialization values are prefixed with TSS_ENCDATA_
and are defined in TcTssConstants. TcTssException
TcIPcrComposite createPcrCompositeObject(long initFlags)
throws TcTssException
initFlags - is used to specify further options for the new object as defined by the TSS
specification. Note: For TSS version 1.1 there is no PCR related init flag defined.
Consequently, 0 should be used as initFlags parameter.
TcTssException
TcIHash createHashObject(long initFlags)
throws TcTssException
initFlags - is used to specify further options for the new object as defined by the TSS
specification. Hash related initialization values are prefixed with TSS_HASH_ and are
defined in TcTssConstants. TcTssException
TcIRsaKey loadKeyByUuidFromSystem(TcTssUuid uuid)
throws TcTssException
uuid - UUID of the key to be loaded.
TcTssException
TcIRsaKey loadKeyByUuidFromUser(TcTssUuid uuid)
throws TcTssException
uuid - UUID of the key to be loaded.
TcTssException
TcIRsaKey loadKeyByBlob(TcIRsaKey unwrappingKey,
TcBlobData blob)
throws TcTssException
unwrappingKey - Key to unwrap the blob.blob - Wrapped key blob to load.
TcTssException
void closeContext()
throws TcTssException
TcTssException
TcTssKmKeyinfo[] getRegisteredKeysByUuid(TcTssUuid uuid,
long storage)
throws TcTssException
uuid - The UUID the key was registered in the persistent storage. If no key UUID is
provided (null), the returned key info array contains data reflecting the whole key
hierarchy starting with the root key. If a certain key UUID is provided, the returned
array only contains data reflecting the path of the key hierarchy regarding that key.
The first array entry is the key addressed by the given UUID followed by its parent
key up to the root key.storage - Flag indicating the persistent storage the key is registered in
(TcTssConstatnts.TSS_PS_TYPE_*).
TcTssException
TcTssKmKeyinfo[] getRegisteredKeysByUuidSystem(TcTssUuid uuid)
throws TcTssException
uuid - (see getRegisteredKeysByUuid)
TcTssException
TcTssKmKeyinfo[] getRegisteredKeysByUuidUser(TcTssUuid uuid)
throws TcTssException
uuid - (see getRegisteredKeysByUuid)
TcTssException
TcIPolicy getDefaultPolicy()
throws TcTssException
TcTssException
void freeMemory(long cPtr)
throws TcTssException
cPtr - The memory block to be freed.
TcTssException
void closeObject(TcIWorkingObject obj)
throws TcTssException
obj - The object to be closed.
TcTssException
TcBlobData getCapability(long capArea,
TcBlobData subCap)
throws TcTssException
capArea - Flag indicating the attribute to query. TcTssConstants.TSS_TCSCAP_ALGTcTssConstants.TSS_TCSCAP_VERSIONTcTssConstants.TSS_TCSCAP_CACHINGTcTssConstants.TSS_TCSCAP_PERSSTORAGETcTssConstants.TSS_TCSCAP_MANUFACTURERTcTssConstants.TSS_TSPCAP_ALGTcTssConstants.TSS_TSPCAP_VERSIONTcTssConstants.TSS_TSPCAP_PERSSTORAGETcTssConstants.TSS_TSPCAP_RANDOMLIMITsubCap - Data indicating the attribute to query. TcTssException
boolean getCapabilityBoolean(long capArea,
TcBlobData subCap)
throws TcTssException
capArea - Flag indicating the attribute to query. TcTssConstants.TSS_TCSCAP_ALGTcTssConstants.TSS_TCSCAP_CACHINGTcTssConstants.TSS_TSPCAP_ALGTcTssConstants.TSS_TSPCAP_PERSSTORAGEsubCap - Data indicating the attribute to query. TcTssConstants.TSS_TCSCAP_PROP_KEYCACHETcTssConstants.TSS_TCSCAP_PROP_AUTHCACHETcTssException
TcTssVersion getCapabilityVersion(long capArea,
TcBlobData subCap)
throws TcTssException
capArea - Flag indicating the attribute to query. subCap - Data indicating the attribute to query
TcTssException
void registerKey(TcIRsaKey key,
long stypeKey,
TcTssUuid uuidKey,
long stypePartenKey,
TcTssUuid uuidParent)
throws TcTssException
key - Handle of the key object addressing the key to be registered.stypeKey - Flag indicating the persistent storageuuidKey - UUID by which the key is registered in the persistent storagestypePartenKey - Flag indicating the persistent storageuuidParent - UUID by which the parent key was registered in the persistent storage
TcTssException
TcIRsaKey unregisterKey(long stypeKey,
TcTssUuid uuidKey)
throws TcTssException
stypeKey - Flag indicating the persistent storageuuidKey - UUID of the key to be removed from the persistent storage
TcTssException
TcIRsaKey getKeyByUuid(long stypeKey,
TcTssUuid uuidKey)
throws TcTssException
stypeKey - Flag indicating the persistent storageuuidKey - UUID of the key by which the key was registered in the persistent storage
TcTssException
TcIRsaKey getKeyByPublicInfo(long stypeKey,
long algId,
TcBlobData publicInfo)
throws TcTssException
stypeKey - Flag indicating the persistent storage.algId - Parameter indicates the algorithm of the requested key.publicInfo - Public key info provided to identify the key to be looked for.
TcTssException
Object[] tickStampBlog(TcTpmDigest digestToStamp,
TcIRsaKey key,
TcTssValidation validationData)
throws TcTssException
digestToStamp - The 20 byte hash to be time stampedkey - Key to sign the time stampvalidationData - holds a nonce incorporated in stamping in the externalData_ field
TcTssException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||