Package tss

Class TpmDeviceTcp

    • Field Detail

      • CommandSocket

        protected Socket CommandSocket
      • SignalSocket

        protected Socket SignalSocket
    • Constructor Detail

      • TpmDeviceTcp

        public TpmDeviceTcp​(String hostName,
                            int port,
                            boolean linuxTrm)
      • TpmDeviceTcp

        public TpmDeviceTcp​(String hostName,
                            int port)
    • Method Detail

      • connect

        public boolean connect()
        Description copied from class: TpmDevice
        Establishes a connection with the TPM device.
        Specified by:
        connect in class TpmDevice
        Returns:
        Whether the connection was established
      • connect

        public void connect​(String hostName,
                            int port,
                            boolean linuxTrm)
      • connect

        public void connect​(String hostName,
                            int port)
      • 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 class TpmDevice
        Parameters:
        commandBuffer - TPM command buffer
      • getResponse

        public byte[] getResponse()
        Specified by:
        getResponse in class TpmDevice
        Returns:
        TPM response buffer received from the TPM device
      • responseReady

        public boolean responseReady()
        Specified by:
        responseReady in class TpmDevice
        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.
        Overrides:
        powerCtl in class TpmDevice
        Parameters:
        on - New on/off state (true/false correspondingly)
      • 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 class TpmDevice
        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 class TpmDevice
        Parameters:
        locality - New locality value
      • sendCmdAndGetAck

        public void sendCmdAndGetAck​(Socket s,
                                     tss.TpmDeviceTcp.TcpTpmCommands comm)