public abstract class TpmBase extends Object implements Closeable
| Modifier and Type | Field and Description |
|---|---|
TPM_HANDLE |
_EndorsementHandle
Admin handles (and associated auth values) can be associated with a TPM object
|
TPM_HANDLE |
_LockoutHandle
Admin handles (and associated auth values) can be associated with a TPM object
|
TPM_HANDLE |
_OwnerHandle
Admin handles (and associated auth values) can be associated with a TPM object
|
TPM_HANDLE |
_PlatformHandle
Admin handles (and associated auth values) can be associated with a TPM object
|
| Constructor and Description |
|---|
TpmBase() |
| Modifier and Type | Method and Description |
|---|---|
Tpm |
_allowErrors()
For the next TPM command invocation, errors will not cause an exception to be thrown
(use _lastCommandSucceeded or _getLastResponseCode() to check for an error)
|
Tpm |
_expectError(TPM_RC expectedResponse)
For the next TPM command invocation, an exception will be throw if the command
returns a response code different from expectedResponse.
|
Tpm |
_expectMoreResponses(TPM_RC... expectedResponses)
Adds more response codes allowed to be returned by the next executed command.
|
Tpm |
_expectResponses(TPM_RC... expectedResponses)
The next executed command should return one of the response codes contained
in the given list.
|
TpmDeviceBase |
_getDevice()
Tpm objects can interact with TPMs over a variety of interfaces called "devices." This returns
the current attached device
|
TPM_RC[] |
_GetExpectedResponses() |
TPM_RC |
_getLastResponseCode()
Get the last TPM response code
|
Boolean |
_lastCommandSucceeded()
Did the last TPM command return RC_SUCCESS?
|
void |
_setCallback(TpmCallbackInterface callback)
Clients can register for callbacks, e.g.
|
void |
_setDevice(TpmDeviceBase theDevice)
Tpm objects can interact with TPMs over a variety of interfaces.
|
Tpm |
_withSession(TPM_HANDLE h)
Specifies a single session handle to use with the next command
|
Tpm |
_withSessions(TPM_HANDLE... hh)
Specifies the session handles to use with the next command
|
void |
close() |
protected void |
DispatchCommand(TPM_CC command,
TPM_HANDLE[] inHandles,
int authHandleCount,
int outHandleCount,
TpmStructure inParms,
TpmStructure outParms)
Send a command to the underlying TPM
|
TPM_RC |
getLastResponseCode()
Get last response code returned from the TPM (e.g.
|
public TPM_HANDLE _OwnerHandle
public TPM_HANDLE _EndorsementHandle
public TPM_HANDLE _PlatformHandle
public TPM_HANDLE _LockoutHandle
public void _setDevice(TpmDeviceBase theDevice)
theDevice - A transport connection to a TPM devicepublic TpmDeviceBase _getDevice()
public Tpm _allowErrors()
public TPM_RC[] _GetExpectedResponses()
public Tpm _expectError(TPM_RC expectedResponse)
expectedResponse - Expected response code. May be null or TPM_RC.SUCCESS.public Tpm _expectResponses(TPM_RC... expectedResponses)
expectedResponses - One or more allowed response codes. May be null.public Tpm _expectMoreResponses(TPM_RC... expectedResponses)
expectedResponses - Additional allowed response codes. May not be null.public Boolean _lastCommandSucceeded()
public TPM_RC _getLastResponseCode()
public Tpm _withSession(TPM_HANDLE h)
h - Session handlepublic Tpm _withSessions(TPM_HANDLE... hh)
hh - List of up to 3 session handlespublic TPM_RC getLastResponseCode()
protected void DispatchCommand(TPM_CC command, TPM_HANDLE[] inHandles, int authHandleCount, int outHandleCount, TpmStructure inParms, TpmStructure outParms)
command - The command codeinHandles - Input handlesauthHandleCount - Number of handles that need authorizationoutHandleCount - countinParms - The input parameter structureoutParms - The output parameter structurepublic void _setCallback(TpmCallbackInterface callback)
callback - Reference to a TpmCallbackInterface implementationpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2017. All rights reserved.