|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectiaik.tc.tss.impl.java.tsp.TcAttributes
iaik.tc.tss.impl.java.tsp.TcWorkingObject
iaik.tc.tss.impl.java.tsp.TcContext
public class TcContext
| 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(java.lang.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. |
TcIMigData |
createMigDataObject(long initFlags)
This method returns a new migdata 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)
For general details on this method please refer to TcIContext.createRsaKeyObject(long). |
void |
freeMemory(long cPtr)
Deprecated. |
long |
getAttribConnectionVersion(long subFlag)
This method returns the connection version. |
long |
getAttribHashMode(long subFlag)
This method returns if secrets obtained via popups are hashed with or without null termination. |
TcBlobData |
getAttribMachineName(long subFlag)
This method returns the machines host name. |
long |
getAttribSilentMode(long subFlag)
This method returns the silent mode setting of the context. |
long |
getAttribVersionMode(long subFlag)
This method returns the version mode setting of the context. |
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()
Note: The default policy object is returned by reference. |
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. |
TcIMonotonicCtr |
getMonotonicCounters(long handle)
This method is used to obtain a Monotonic Counter object that allows interaction with the TPM's counters. |
TcINvRam |
getNvRamObject(long nvIndex)
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. |
TcITcsBinding |
getTcsBinding()
This method returns the underlying TCS binding. |
long |
getTcsContextHandle()
This method returns the handle of the corresponding TCS context. |
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 stypeParentKey,
TcTssUuid uuidParent)
This method registers a key in the TSS Persistent Storage database. |
void |
setAttribHashMode(long subflag,
long attrib)
This method is used to specify if passwords obtained via popups should be hashed with or without null termination. |
void |
setAttribSilentMode(long subflag,
long attrib)
This method is used to specify if GUI popups for entering passwords should be displayed or not. |
void |
setAttribVersionMode(long subflag,
long attrib)
This method is used to specify if 1.1 or 1.2. |
TcIRsaKey |
unregisterKey(long stypeKey,
TcTssUuid uuidKey)
This method unregisters a key from the persistent storage database. |
| Methods inherited from class iaik.tc.tss.impl.java.tsp.TcAttributes |
|---|
getAttribData, getAttribUint32, setAttribData, setAttribUint32 |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface iaik.tc.tss.api.tspi.TcIAttributes |
|---|
getAttribData, getAttribUint32, setAttribData, setAttribUint32 |
| Method Detail |
|---|
public void connect(java.lang.String hostname)
throws TcTssException
TcIContext
connect in interface TcIContexthostname - The name of the cost to connect to. For example "http://127.0.0.1:30004/axis/services/TSSCoreServiceBindingImpl"
TcTssException
public void connect()
throws TcTssException
TcIContext
connect in interface TcIContextTcTssException
public void closeContext()
throws TcTssException
TcIContext
closeContext in interface TcIContextTcTssException
public void closeObject(TcIWorkingObject obj)
throws TcTssException
TcIContext
closeObject in interface TcIContextobj - The object to be closed.
TcTssExceptionpublic TcITcsBinding getTcsBinding()
public long getTcsContextHandle()
throws TcTssException
TcTssExceptionpublic boolean isConnected()
TcIContext
isConnected in interface TcIContext
public void freeMemory(long cPtr)
throws TcTssException
freeMemory in interface TcIContextcPtr - The memory block to be freed.
TcTssException
public TcBlobData getCapability(long capArea,
TcBlobData subCap)
throws TcTssException
TcIContext
getCapability in interface TcIContextcapArea - 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
public boolean getCapabilityBoolean(long capArea,
TcBlobData subCap)
throws TcTssException
TcIContext
getCapabilityBoolean in interface TcIContextcapArea - Flag indicating the attribute to query. TcTssConstants.TSS_TCSCAP_ALGTcTssConstants.TSS_TCSCAP_PERSSTORAGETcTssConstants.TSS_TCSCAP_CACHINGTcTssConstants.TSS_TSPCAP_ALGTcTssConstants.TSS_TSPCAP_PERSSTORAGEsubCap - Data indicating the attribute to query. TcTssConstants.TSS_TCSCAP_PROP_KEYCACHETcTssConstants.TSS_TCSCAP_PROP_AUTHCACHETcTssException
public TcTssVersion getCapabilityVersion(long capArea,
TcBlobData subCap)
throws TcTssException
TcIContext
getCapabilityVersion in interface TcIContextcapArea - Flag indicating the attribute to query. subCap - Data indicating the attribute to query
TcTssException
public TcIEncData createEncDataObject(long initFlags)
throws TcTssException
TcIContext
createEncDataObject in interface TcIContextinitFlags - 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
public TcIHash createHashObject(long initFlags)
throws TcTssException
TcIContext
createHashObject in interface TcIContextinitFlags - 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
public TcIMigData createMigDataObject(long initFlags)
throws TcTssException
TcIContext
createMigDataObject in interface TcIContextinitFlags - is used to specify further options for the new object as defined by the TSS
specification. Note: For TSS version 1.2 there is no migdata related init flag defined.
Consequently, 0 should be used as initFlags parameter.
TcTssException
public TcIPcrComposite createPcrCompositeObject(long initFlags)
throws TcTssException
TcIContext
createPcrCompositeObject in interface TcIContextinitFlags - 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
public TcIPolicy createPolicyObject(long initFlags)
throws TcTssException
TcIContext
createPolicyObject in interface TcIContextinitFlags - 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
public TcIRsaKey createRsaKeyObject(long initFlags)
throws TcTssException
TcIContext.createRsaKeyObject(long).
createRsaKeyObject in interface TcIContextinitFlags - 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
public TcIPolicy getDefaultPolicy()
throws TcTssException
TcIContext.getDefaultPolicy().
getDefaultPolicy in interface TcIContextTcTssException
public TcIRsaKey getKeyByPublicInfo(long stypeKey,
long algId,
TcBlobData publicInfo)
throws TcTssException
TcIContext
getKeyByPublicInfo in interface TcIContextstypeKey - 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
public TcIRsaKey getKeyByUuid(long stypeKey,
TcTssUuid uuidKey)
throws TcTssException
TcIContext
getKeyByUuid in interface TcIContextstypeKey - Flag indicating the persistent storageuuidKey - UUID of the key by which the key was registered in the persistent storage
TcTssException
public TcTssKmKeyinfo[] getRegisteredKeysByUuid(TcTssUuid uuid,
long storage)
throws TcTssException
TcIContext
getRegisteredKeysByUuid in interface TcIContextuuid - 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
public TcTssKmKeyinfo[] getRegisteredKeysByUuidSystem(TcTssUuid uuid)
throws TcTssException
TcIContext
getRegisteredKeysByUuidSystem in interface TcIContextuuid - (see getRegisteredKeysByUuid)
TcTssException
public TcTssKmKeyinfo[] getRegisteredKeysByUuidUser(TcTssUuid uuid)
throws TcTssException
TcIContext
getRegisteredKeysByUuidUser in interface TcIContextuuid - (see getRegisteredKeysByUuid)
TcTssException
public TcITpm getTpmObject()
throws TcTssException
TcIContext
getTpmObject in interface TcIContextTcTssException
public TcIRsaKey loadKeyByBlob(TcIRsaKey unwrappingKey,
TcBlobData blob)
throws TcTssException
TcIContext
loadKeyByBlob in interface TcIContextunwrappingKey - Key to unwrap the blob.blob - Wrapped key blob to load.
TcTssException
public TcIRsaKey loadKeyByUuidFromSystem(TcTssUuid uuid)
throws TcTssException
TcIContext
loadKeyByUuidFromSystem in interface TcIContextuuid - UUID of the key to be loaded.
TcTssException
public TcIRsaKey loadKeyByUuidFromUser(TcTssUuid uuid)
throws TcTssException
TcIContext
loadKeyByUuidFromUser in interface TcIContextuuid - UUID of the key to be loaded.
TcTssException
public void registerKey(TcIRsaKey key,
long stypeKey,
TcTssUuid uuidKey,
long stypeParentKey,
TcTssUuid uuidParent)
throws TcTssException
TcIContext
registerKey in interface TcIContextkey - 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 storagestypeParentKey - Flag indicating the persistent storageuuidParent - UUID by which the parent key was registered in the persistent storage
TcTssException
public TcIRsaKey unregisterKey(long stypeKey,
TcTssUuid uuidKey)
throws TcTssException
TcIContext
unregisterKey in interface TcIContextstypeKey - Flag indicating the persistent storageuuidKey - UUID of the key to be removed from the persistent storage
TcTssException
public void setAttribSilentMode(long subflag,
long attrib)
throws TcTssException
TcIAttributes.setAttribUint32(long, long, long). Note that this method is not
standardized as part of the TSP Interface (TSPI).
subflag - Ignored (set to 0).attrib - Either TcTssConstants.TSS_TSPATTRIB_CONTEXT_SILENT or
TcTssConstants.TSS_TSPATTRIB_CONTEXT_NOT_SILENT.
TcTssException
public long getAttribSilentMode(long subFlag)
throws TcTssException
TcIAttributes.getAttribUint32(long, long).
subFlag - Ignored (set to 0).
TcTssConstants.TSS_TSPATTRIB_CONTEXT_SILENT or
TcTssConstants.TSS_TSPATTRIB_CONTEXT_NOT_SILENT.
TcTssException
public void setAttribVersionMode(long subflag,
long attrib)
throws TcTssException
TcIAttributes.setAttribUint32(long, long, long).
subflag - Ignored (set to 0).attrib - Either TcTssConstants.TSS_TSPATTRIB_CONTEXT_VERSION_V1_1 or
TcTssConstants.TSS_TSPATTRIB_CONTEXT_VERSION_V1_2 or
TcTssConstants.TSS_TSPATTRIB_CONTEXT_VERSION_AUTO.
TcTssException
public long getAttribVersionMode(long subFlag)
throws TcTssException
TcIAttributes.getAttribUint32(long, long).
subFlag - Ignored (set to 0).
TcTssConstants.TSS_TSPATTRIB_CONTEXT_VERSION_V1_1 or
TcTssConstants.TSS_TSPATTRIB_CONTEXT_VERSION_V1_2 or
TcTssConstants.TSS_TSPATTRIB_CONTEXT_VERSION_AUTO.
TcTssException
public void setAttribHashMode(long subflag,
long attrib)
throws TcTssException
TcIAttributes.setAttribUint32(long, long, long).
subflag - TcTssConstants.TSS_TSPATTRIB_SECRET_HASH_MODE_POPUPattrib - Either TcTssConstants.TSS_TSPATTRIB_HASH_MODE_NOT_NULL or
TcTssConstants.TSS_TSPATTRIB_HASH_MODE_NULL.
TcTssException
public long getAttribHashMode(long subFlag)
throws TcTssException
TcIAttributes.getAttribUint32(long, long).
subFlag - TcTssConstants.TSS_TSPATTRIB_SECRET_HASH_MODE_POPUP
TcTssConstants.TSS_TSPATTRIB_HASH_MODE_NOT_NULL or
TcTssConstants.TSS_TSPATTRIB_HASH_MODE_NULL.
TcTssException
public long getAttribConnectionVersion(long subFlag)
throws TcTssException
TcIAttributes.getAttribUint32(long, long).
subFlag - Ignored (set to 0).
TcTssConstants.TSS_CONNECTION_VERSION_1_1 or
TcTssConstants.TSS_CONNECTION_VERSION_1_2.
{@link - TcTssException}
TcTssException
public TcBlobData getAttribMachineName(long subFlag)
throws TcTssException
TcIAttributes.getAttribUint32(long, long).
subFlag - Ignored (set to 0).
{@link - TcTssException}
TcTssException
public TcIMonotonicCtr getMonotonicCounters(long handle)
throws TcTssException
TcIContext
getMonotonicCounters in interface TcIContextTcTssException
public TcINvRam getNvRamObject(long nvIndex)
throws TcTssException
TcIContext
getNvRamObject in interface TcIContextTcTssException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||