iaik.tc.tss.impl.java.tcs.eventmgr
Class TcTcsEventMgrFlatFile

java.lang.Object
  extended by iaik.tc.tss.impl.java.tcs.eventmgr.TcTcsEventMgrFlatFile
All Implemented Interfaces:
TcITcsEventMgr

public class TcTcsEventMgrFlatFile
extends java.lang.Object
implements TcITcsEventMgr

This class implements a flat file event manager. The event information is stored in a stored measurement log (SML) file described in the configuration file. The event log has the following format:

[PCR] [measurement hash] [event] [event description]

The PCR is a decimal number, the measurement hash and event are hexadecimal numbers.


Method Summary
static TcITcsEventMgr getInstance()
           
static TcITcsEventMgr getInstance(java.io.File sml)
           
 TcTssPcrEvent getPcrEvent(long pcrIndex, long pNumber)
          Reads out the desired event using getPcrEventsByPcr().
 long getPcrEventCount(long pcrIndex)
          Counts the events of a PCR
 TcTssPcrEvent[] getPcrEventLog()
          Reads out all PCR events with getPcrEventsByPcr() an then returns it all together.
 TcTssPcrEvent[] getPcrEventsByPcr(long pcrIndex, long firstEvent, long eventCount)
          Reads out the desired events from the log file and returns it as an array of TcTssPcrEvent[].
 long logPcrEvent(TcTssPcrEvent pcrEvent)
          Converts the input event to a string and writes it into the log file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static TcITcsEventMgr getInstance()
                                  throws TcTcsException
Throws:
TcTcsException

getInstance

public static TcITcsEventMgr getInstance(java.io.File sml)
                                  throws TcTcsException
Throws:
TcTcsException

getPcrEvent

public TcTssPcrEvent getPcrEvent(long pcrIndex,
                                 long pNumber)
                          throws TcTcsException
Reads out the desired event using getPcrEventsByPcr().

Specified by:
getPcrEvent in interface TcITcsEventMgr
Throws:
TcTcsException

getPcrEventCount

public long getPcrEventCount(long pcrIndex)
                      throws TcTcsException
Counts the events of a PCR

Specified by:
getPcrEventCount in interface TcITcsEventMgr
Throws:
TcTcsException

getPcrEventsByPcr

public TcTssPcrEvent[] getPcrEventsByPcr(long pcrIndex,
                                         long firstEvent,
                                         long eventCount)
                                  throws TcTcsException
Reads out the desired events from the log file and returns it as an array of TcTssPcrEvent[].

Specified by:
getPcrEventsByPcr in interface TcITcsEventMgr
Throws:
TcTcsException

getPcrEventLog

public TcTssPcrEvent[] getPcrEventLog()
                               throws TcTcsException
Reads out all PCR events with getPcrEventsByPcr() an then returns it all together.

Specified by:
getPcrEventLog in interface TcITcsEventMgr
Throws:
TcTcsException

logPcrEvent

public long logPcrEvent(TcTssPcrEvent pcrEvent)
                 throws TcTcsException
Converts the input event to a string and writes it into the log file.

Specified by:
logPcrEvent in interface TcITcsEventMgr
Throws:
TcTcsException