|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectiaik.tc.tss.impl.java.tcs.sessmgr.TcTcsSessManager
public class TcTcsSessManager
The functionality provided by this class is only usable by TPMs conforming to the version 1.2 of the TPM specification! This class implements the management of saved TPM sessions as specified in the 1.2 TPM specification. Sessions can be exported from the TPM via the TPM_SaveContext command and re-loaded into the TPM using the TPM_LoadContext command. The number of sessions that can be saved is limited by the size of contextList[]. This is a list kept inside the TPM that holds contextCound values. All sessions exported from the TPM are assigned such a contextCount value which is not allowed to wrap. Note: The following resource types are handled in contextList: TPM_RT_AUTH, TPM_RT_TRANS, TPM_RT_DAA_TPM. Keys (TPM_RT_KEY) are NOT handled in this list. That means that the size limitation of contextList does NOT apply to keys exported (via SaveContext) from the TPM.
Constructor Summary | |
---|---|
TcTcsSessManager()
|
Method Summary | |
---|---|
void |
addSavedSession(TcTpmContextBlob blob)
This method adds a session to the list of saved sessions. |
void |
evictAllSavedSessions()
This method evicts all saved context sessions from the TPM. |
void |
evictAllSavedSessions(TcTddl tddl)
This method evicts all saved context sessions from the TPM. |
boolean |
evictOldestSavedSess(long[] notHandles)
According to the TPM 1.2 spec, a TPM can only hold a limited amount of saved sessions (this is limited by the size of contextList inside the TPM). |
boolean |
evictOldestSavedSess(long resType,
long[] notHandles)
According to the TPM 1.2 spec, a TPM can only hold a limited amount of saved sessions (this is limited by the size of contextList inside the TPM). |
static TcTcsSessManager |
getInstance()
This class can only be instantiated once (Singleton). |
long |
getNumFreeSavedSessSlots()
This method returns the number of free (available) slots for saved contexts inside the TPM. |
boolean |
handleIsInCache(long resType,
long handle)
This method checks if an entity with the given resource type and handle is in the cache. |
long |
loadSession(long resType,
long handle)
This method loads a saved session into the TPM. |
java.lang.String |
savedSessionsToString()
This method is designed for debug purposes. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TcTcsSessManager()
Method Detail |
---|
public static TcTcsSessManager getInstance()
public void evictAllSavedSessions() throws TcTddlException, TcTpmException
TcTddlException
TcTpmException
public void evictAllSavedSessions(TcTddl tddl) throws TcTddlException, TcTpmException
TcTddlException
TcTpmException
public void addSavedSession(TcTpmContextBlob blob)
blob
- The saved context blob that was exported from the TPM.public long getNumFreeSavedSessSlots() throws TcTddlException, TcTpmException
TcTddlException
TcTpmException
public boolean evictOldestSavedSess(long resType, long[] notHandles) throws TcTddlException, TcTpmException
resType
- The resource type of the session to be removed.notHandles
- With this parameter, the caller can specify a handle that MUST not be removed
even if it is the oldest handle of the given resource type. If passing -1 (invalid
handle) as notHandle, this parameter has no effect.
TcTddlException
TcTpmException
public boolean evictOldestSavedSess(long[] notHandles) throws TcTddlException, TcTpmException
notHandles
- With this parameter, the caller can specify handles that MUST not be removed
even if they are the oldest handles of the given resource type. If passing an empty
array as notHandles, this parameter has no effect.
TcTddlException
TcTpmException
public long loadSession(long resType, long handle) throws TcTddlException, TcTpmException, TcTcsException
resType
- The resource type of the session to be loaded.handle
- The handle of the session to be reloaded.
TcTddlException
TcTpmException
TcTcsException
- This exception is thrown if the given resource type/handle combination
could not be found in the cache.public boolean handleIsInCache(long resType, long handle)
public java.lang.String savedSessionsToString() throws TcTddlException, TcTpmException
TcTddlException
TcTpmException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |