C# 클래스 Tpm2Lib.Tbs

Instances of the class TPM are created on top of TPM devices (either a physical TPM, or another Tbs) via new Tbs(theTpmDevice). TPM device contexts are then typically created through GetTpm(int locality).
상속: IDisposable
파일 보기 프로젝트 열기: Microsoft/TSS.MSR 1 사용 예제들

공개 메소드들

메소드 설명
DebugAssertTpmIsEmpty ( ) : void
DestroyContext ( Tpm2Lib.Tpm2Device tpmDevice ) : void
Dispose ( ) : void
DisposeContext ( TbsContext c ) : void

Removes all TPM objects referenced by this context and then removes the context from the TBS database.

GetFreeSessionCount ( ) : int
GetSessionCount ( int &savedSessionCount ) : int
GetUnderlyingTpm ( ) : Tpm2
NumActiveContexts ( ) : int
NumEntitiesInTpm ( ) : int
SetS3Probability ( double probability ) : void

If probability is not 0.0, the SlotManager will randomly cycle the TPM through a simulated S3 transition at the start of DispatchCommand (before the requested command is invoked).

Tbs ( Tpm2Lib.Tpm2Device theUnderlyingTpm, bool tpmHasRm ) : System

비공개 메소드들

메소드 설명
CheckConsistency ( string message = "" ) : void
CleanTpm ( ) : void
ContextSaveEverything ( ) : void
CreateTbsContext ( ) : TbsContext
DebugStateSave ( ) : void
DispatchCommand ( TbsContext caller, Tpm2Lib.CommandModifier active, byte inBuf, byte &outBuf ) : void

Dispatch a command to the underlying TPM. This method implements all significant functionality. DispatchCommand examines the command stream and performs (approximately) the following functions 1) If the command references a handle (session or transient object) then TBS makes sure that the entity is loaded. If it is, then the handle is "translated" to the underlying TPM handle. If it is not, then TBS checks to see if it has a saved context for the entity, and if so loads it. 2) If the command will fill a slot, then TBS ensures that a slot is available. It does this by ContextSaving the LRU entity of the proper type (that is not used in this command).

FormatError ( TpmRc errorCode ) : byte[]

Create a 10 byte error response that matches TPM error responses.

GetAllLoadedEntities ( Tpm2 tpm ) : Tpm2Lib.TpmHandle[]
GetLoadedEntities ( Tpm2 tpm, Ht rangeToQuery ) : Tpm2Lib.TpmHandle[]
GetReferencedObjects ( TbsContext caller, TpmHandle inHandles ) : Tpm2Lib.ObjectContext[]

Look up TBS ObjectContext records given the handles in the inHandles input parms.

GetResultCode ( byte responseBuf ) : TpmRc
GetSessions ( TbsContext caller, SessionIn inSessions ) : Tpm2Lib.ObjectContext[]

Get the TBS ObjectContext given SessionIn objects collected from the inputs stream.

LoadEntities ( ObjectContext neededContexts ) : bool

Ensure that all referenced objects are loaded.

LoadObject ( ObjectContext contextToLoad, ObjectContext doNotEvict ) : bool

Load an object making a space if needed. If we need to make a space then we are mindful not to evict anything in the doNotEvict array.

MakeSpace ( SlotType neededSlot, ObjectContext doNotEvict ) : bool

Make a space in the TPM for an entity of type neededSlot (while not evicting another needed entity)

ProcessUpdatedTpmState ( TbsContext caller, Tpm2Lib.CommandInfo command, TpmHandle responseHandles, ObjectContext inputObjects ) : void

Updates TBS context database for commands that either fill or empty slots.

ReplaceHandlesIn ( TpmHandle handles, SessionIn sessions, ObjectContext theObjects, ObjectContext theSessions ) : void

Modifies the handles and sessions arrays so that they contain the translated handles.

ReplaceHandlesOut ( IEnumerable outHandles ) : void
SlotTypeFromHandle ( TpmHandle h ) : SlotType
StateSaveAndReload ( bool startupState, bool doPowerCycle ) : void

TPM Debug support. Cycle the TPM through (a) SaveContext all loaded contexts, (b) StateSave(), (c) powerOff, (d) powerOn (e) Startup(SU_State) or Startup(S_CLEAR). Then needed objects and sessions will be paged back in as needed. This command is NOT thread safe. This command has side-effects on the startup counter and will likely result in clock discontinuities.

UpdateLastUseCount ( IEnumerable entities ) : void

메소드 상세

DebugAssertTpmIsEmpty() 공개 메소드

public DebugAssertTpmIsEmpty ( ) : void
리턴 void

DestroyContext() 공개 메소드

public DestroyContext ( Tpm2Lib.Tpm2Device tpmDevice ) : void
tpmDevice Tpm2Lib.Tpm2Device
리턴 void

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

DisposeContext() 공개 메소드

Removes all TPM objects referenced by this context and then removes the context from the TBS database.
public DisposeContext ( TbsContext c ) : void
c TbsContext
리턴 void

GetFreeSessionCount() 공개 메소드

public GetFreeSessionCount ( ) : int
리턴 int

GetSessionCount() 공개 메소드

public GetSessionCount ( int &savedSessionCount ) : int
savedSessionCount int
리턴 int

GetUnderlyingTpm() 공개 메소드

public GetUnderlyingTpm ( ) : Tpm2
리턴 Tpm2

NumActiveContexts() 공개 메소드

public NumActiveContexts ( ) : int
리턴 int

NumEntitiesInTpm() 공개 메소드

public NumEntitiesInTpm ( ) : int
리턴 int

SetS3Probability() 공개 메소드

If probability is not 0.0, the SlotManager will randomly cycle the TPM through a simulated S3 transition at the start of DispatchCommand (before the requested command is invoked).
public SetS3Probability ( double probability ) : void
probability double
리턴 void

Tbs() 공개 메소드

public Tbs ( Tpm2Lib.Tpm2Device theUnderlyingTpm, bool tpmHasRm ) : System
theUnderlyingTpm Tpm2Lib.Tpm2Device
tpmHasRm bool
리턴 System