Package tss
Class TpmFactory
- java.lang.Object
-
- tss.TpmFactory
-
public class TpmFactory extends Object
Contains methods for instantiating TPM instances on top of various TPM-transport connections- Author:
- pengland
-
-
Constructor Summary
Constructors Constructor Description TpmFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Tpm
localTpmSimulator()
Connect to a simulator running on localhost using the default ports.static Tpm
platformTpm()
Connect to the platform TPM device.static Tpm
remoteTpm(String hostName, int port)
Connect either to a TPM simulator or to a proxy server implementing the TPM simulator protocol.
-
-
-
Method Detail
-
localTpmSimulator
public static Tpm localTpmSimulator()
Connect to a simulator running on localhost using the default ports. Upon successful connection this method power-cycles the simulator and executes TPM2_Statup(SU_CLEAR) command. Note that only one Tpm device instance at a time can connect to a local simulator.- Returns:
- New Tpm instance with an connected TpmDeviceTcp
-
remoteTpm
public static Tpm remoteTpm(String hostName, int port)
Connect either to a TPM simulator or to a proxy server implementing the TPM simulator protocol. The latter can be used to access platform TPM on a remote host.- Parameters:
hostName
- Remote host (dotted IP address or DNS host name)port
- Port number of the TPM command socket. Note that the protocol also uses port+1 to accept control signals.- Returns:
- New Tpm instance with an connected TpmDeviceTcp
-
platformTpm
public static Tpm platformTpm()
Connect to the platform TPM device. On Windows this will connect via TPM Base Services (TBS). On Linux this will connect to /dev/tpm.- Returns:
- The new Tpm instance with an connected TpmDeviceTbs
-
-