Package tss
Class TpmDeviceTcp
- java.lang.Object
-
- tss.TpmDevice
-
- tss.TpmDeviceTcp
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class TpmDeviceTcp extends TpmDevice
-
-
Field Summary
Fields Modifier and Type Field Description protected Socket
CommandSocket
protected Socket
SignalSocket
-
Fields inherited from class tss.TpmDevice
TpmInfo, TpmInRawMode, TpmLinuxOldUserModeTrm, TpmNoLocalityCtl, TpmNoPowerCtl, TpmPlatformAvailable, TpmSocketConn, TpmSupportsPP, TpmTbsConn, TpmTctiConn, TpmUsesTrm
-
-
Constructor Summary
Constructors Constructor Description TpmDeviceTcp(String hostName, int port)
TpmDeviceTcp(String hostName, int port, boolean linuxTrm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
assertPhysicalPresence(boolean on)
Asserts or stops asserting Physical Presence.void
close()
Closes the established connection with the TPM device.boolean
connect()
Establishes a connection with the TPM device.void
connect(String hostName, int port)
void
connect(String hostName, int port, boolean linuxTrm)
void
dispatchCommand(byte[] commandBuffer)
Sends the TPM command buffer byte array to the TPMbyte[]
getResponse()
void
powerCtl(boolean on)
Powers on/off the TPM.boolean
responseReady()
void
sendCmdAndGetAck(Socket s, tss.TpmDeviceTcp.TcpTpmCommands comm)
void
setLocality(int locality)
Sets the locality for subsequent commands.-
Methods inherited from class tss.TpmDevice
implementsPhysicalPresence, localityCtlAvailable, platformAvailable, powerCtlAvailable, powerCycle, powerOff, powerOn, ppOff, ppOn
-
-
-
-
Method Detail
-
connect
public boolean connect()
Description copied from class:TpmDevice
Establishes a connection with the TPM device.
-
connect
public void connect(String hostName, int port, boolean linuxTrm)
-
connect
public void connect(String hostName, int port)
-
close
public void close()
Description copied from class:TpmDevice
Closes the established connection with the TPM device.
-
dispatchCommand
public void dispatchCommand(byte[] commandBuffer)
Description copied from class:TpmDevice
Sends the TPM command buffer byte array to the TPM- Specified by:
dispatchCommand
in classTpmDevice
- Parameters:
commandBuffer
- TPM command buffer
-
getResponse
public byte[] getResponse()
- Specified by:
getResponse
in classTpmDevice
- Returns:
- TPM response buffer received from the TPM device
-
responseReady
public boolean responseReady()
- Specified by:
responseReady
in classTpmDevice
- Returns:
- Whether the TPM response to the previously issued command is ready
-
powerCtl
public void powerCtl(boolean on)
Description copied from class:TpmDevice
Powers on/off the TPM. Only implemented for TPM simulators and TPM vendors test harness.
-
assertPhysicalPresence
public void assertPhysicalPresence(boolean on)
Description copied from class:TpmDevice
Asserts or stops asserting Physical Presence. Only implemented for TPM simulators and TPM vendors test harness.- Overrides:
assertPhysicalPresence
in classTpmDevice
- Parameters:
on
- New on/off state (true/false correspondingly)
-
setLocality
public void setLocality(int locality)
Description copied from class:TpmDevice
Sets the locality for subsequent commands. Only implemented for TPM simulators and TPM vendors test harness.- Overrides:
setLocality
in classTpmDevice
- Parameters:
locality
- New locality value
-
sendCmdAndGetAck
public void sendCmdAndGetAck(Socket s, tss.TpmDeviceTcp.TcpTpmCommands comm)
-
-