|
||||||||
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. |
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)
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. |
TcIMonotonicCtr |
getMonotonicCounters(long nvIndex)
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. |
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)
Deprecated. Use the getRegisteredKeysByUuid method with TSS_PS_TYPE_SYSTEM as parameter instead. |
TcIRsaKey |
loadKeyByUuidFromUser(TcTssUuid uuid)
Deprecated. Use the getRegisteredKeysByUuid method with TSS_PS_TYPE_USER as parameter instead. |
void |
registerKey(TcIRsaKey key,
long stypeKey,
TcTssUuid uuidKey,
long stypeParentKey,
TcTssUuid uuidParent)
This method registers a key in the TSS Persistent Storage database. |
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. For example "http://127.0.0.1:30004/axis/services/TSSCoreServiceBindingImpl"
TcTssException
void connect() throws TcTssException
TcTssException
boolean isConnected()
TcITpm getTpmObject() throws TcTssException
TcTssException
TcIMonotonicCtr getMonotonicCounters(long nvIndex) throws TcTssException
TcTssException
TcINvRam getNvRamObject(long nvIndex) 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_DEFAULT
TcTssConstants.TSS_KEY_SIZE_512
TcTssConstants.TSS_KEY_SIZE_1024
TcTssConstants.TSS_KEY_SIZE_2048
TcTssConstants.TSS_KEY_SIZE_4096
TcTssConstants.TSS_KEY_SIZE_8192
TcTssConstants.TSS_KEY_SIZE_16384
TcTssConstants.TSS_KEY_TYPE_AUTHCHANGE
TcTssConstants.TSS_KEY_TYPE_BIND
TcTssConstants.TSS_KEY_TYPE_DEFAULT
TcTssConstants.TSS_KEY_TYPE_IDENTITY
TcTssConstants.TSS_KEY_TYPE_LEGACY
(signing and binding)TcTssConstants.TSS_KEY_TYPE_SIGNING
TcTssConstants.TSS_KEY_TYPE_STORAGE
TcTssConstants.TSS_KEY_NON_VOLATILE
TcTssConstants.TSS_KEY_VOLATILE
TcTssConstants.TSS_KEY_NOT_MIGRATABLE
(default)TcTssConstants.TSS_KEY_MIGRATABLE
TcTssConstants.TSS_KEY_CERTIFIED_MIGRATABLE
TcTssConstants.TSS_KEY_NOT_CERTIFIED_MIGRATABLE
TcTssConstants.TSS_KEY_NO_AUTHORIZATION
(default)TcTssConstants.TSS_KEY_AUTHORIZATION
TcTssConstants.TSS_KEY_AUTHORIZATION_PRIV_USE_ONLY
TcTssConstants.TSS_KEY_STRUCT_DEFAULT
(default)TcTssConstants.TSS_KEY_STRUCT_KEY
TcTssConstants.TSS_KEY_STRUCT_KEY12
TcTssConstants.TSS_KEY_TSP_SRK
TcTssException
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
TcIMigData createMigDataObject(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.2 there is no migdata related init flag defined.
Consequently, 0 should be used as initFlags parameter.
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_ALG
TcTssConstants.TSS_TCSCAP_VERSION
TcTssConstants.TSS_TCSCAP_CACHING
TcTssConstants.TSS_TCSCAP_PERSSTORAGE
TcTssConstants.TSS_TCSCAP_MANUFACTURER
TcTssConstants.TSS_TSPCAP_ALG
TcTssConstants.TSS_TSPCAP_VERSION
TcTssConstants.TSS_TSPCAP_PERSSTORAGE
TcTssConstants.TSS_TSPCAP_RANDOMLIMIT
subCap
- 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_ALG
TcTssConstants.TSS_TCSCAP_PERSSTORAGE
TcTssConstants.TSS_TCSCAP_CACHING
TcTssConstants.TSS_TSPCAP_ALG
TcTssConstants.TSS_TSPCAP_PERSSTORAGE
subCap
- Data indicating the attribute to query. TcTssConstants.TSS_TCSCAP_PROP_KEYCACHE
TcTssConstants.TSS_TCSCAP_PROP_AUTHCACHE
TcTssException
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 stypeParentKey, 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 storagestypeParentKey
- 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
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |